Skip to content

Commit 982e443

Browse files
zhanglianjie-163Boris Ostrovsky
authored andcommitted
drivers/xen: use helper macro __ATTR_RW
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 <[email protected]> Reviewed-by: Boris Ostrovsky <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Boris Ostrovsky <[email protected]>
1 parent b359b3a commit 982e443

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/xen/sys-hypervisor.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@
2222
#endif
2323

2424
#define HYPERVISOR_ATTR_RO(_name) \
25-
static struct hyp_sysfs_attr _name##_attr = __ATTR_RO(_name)
25+
static struct hyp_sysfs_attr _name##_attr = __ATTR_RO(_name)
2626

2727
#define HYPERVISOR_ATTR_RW(_name) \
28-
static struct hyp_sysfs_attr _name##_attr = \
29-
__ATTR(_name, 0644, _name##_show, _name##_store)
28+
static struct hyp_sysfs_attr _name##_attr = __ATTR_RW(_name)
3029

3130
struct hyp_sysfs_attr {
3231
struct attribute attr;

0 commit comments

Comments
 (0)