Skip to content

Commit

Permalink
x86/xen: Convert to DEFINE_SHOW_ATTRIBUTE
Browse files Browse the repository at this point in the history
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20200917125547.104472-1-miaoqinglang@huawei.com
Signed-off-by: Juergen Gross <jgross@suse.com>
  • Loading branch information
Qinglang Miao authored and Juergen Gross committed Dec 16, 2020
1 parent 1c72871 commit e34ff4c
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions arch/x86/xen/p2m.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,17 +795,7 @@ static int p2m_dump_show(struct seq_file *m, void *v)
return 0;
}

static int p2m_dump_open(struct inode *inode, struct file *filp)
{
return single_open(filp, p2m_dump_show, NULL);
}

static const struct file_operations p2m_dump_fops = {
.open = p2m_dump_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
DEFINE_SHOW_ATTRIBUTE(p2m_dump);

static struct dentry *d_mmu_debug;

Expand Down

0 comments on commit e34ff4c

Please sign in to comment.