]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
KVM: PPC: Book3S HV: XIVE: Convert to DEFINE_SHOW_ATTRIBUTE
authorQinglang Miao <miaoqinglang@huawei.com>
Sat, 19 Sep 2020 01:29:25 +0000 (09:29 +0800)
committerPaul Mackerras <paulus@ozlabs.org>
Tue, 22 Sep 2020 01:53:55 +0000 (11:53 +1000)
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_xive_native.c

index bdea91df1497425f0d5395a7d666b9a25fb12e9e..d0c2db0e07fa2c683df30648d32ee18667d93d5b 100644 (file)
@@ -1227,17 +1227,7 @@ static int xive_native_debug_show(struct seq_file *m, void *private)
        return 0;
 }
 
-static int xive_native_debug_open(struct inode *inode, struct file *file)
-{
-       return single_open(file, xive_native_debug_show, inode->i_private);
-}
-
-static const struct file_operations xive_native_debug_fops = {
-       .open = xive_native_debug_open,
-       .read = seq_read,
-       .llseek = seq_lseek,
-       .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(xive_native_debug);
 
 static void xive_native_debugfs_init(struct kvmppc_xive *xive)
 {