drivers/xen: use helper macro __ATTR_RW
authorzhanglianjie <zhanglianjie@uniontech.com>
Sat, 5 Mar 2022 13:38:23 +0000 (21:38 +0800)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Thu, 10 Mar 2022 15:27:55 +0000 (09:27 -0600)
Use helper macro __ATTR_RW to define HYPERVISOR_ATTR_RW to make code more clear.
Minor readability improvement.

Remove extra whitespace [boris: added this comment]

Signed-off-by: zhanglianjie <zhanglianjie@uniontech.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Link: https://lore.kernel.org/r/20220305133823.158961-1-zhanglianjie@uniontech.com
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
drivers/xen/sys-hypervisor.c

index feb1d16252e70566a17cad56dbd70068ce7285b4..fcb0792f090e0c1511be41d8b6950de8aa2c1f03 100644 (file)
 #endif
 
 #define HYPERVISOR_ATTR_RO(_name) \
-static struct hyp_sysfs_attr  _name##_attr = __ATTR_RO(_name)
+static struct hyp_sysfs_attr _name##_attr = __ATTR_RO(_name)
 
 #define HYPERVISOR_ATTR_RW(_name) \
-static struct hyp_sysfs_attr _name##_attr = \
-       __ATTR(_name, 0644, _name##_show, _name##_store)
+static struct hyp_sysfs_attr _name##_attr = __ATTR_RW(_name)
 
 struct hyp_sysfs_attr {
        struct attribute attr;