xen: use helper macro __ATTR_RW
PATCH 1/1 xen: use helper macro __ATTR_RW
Use helper macro __ATTR_RW to define hyp_sysfs_attr to make code more clear. Minor readability improvement.
Signed-off-by Miaohe Lin <[email protected]>
--- drivers/xen/sys-hypervisor.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/xen/sys-hypervisor.c +1 -2
@@ -25,8 +25,7 @@ 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;
Signature · 1 line
2.23.0
Quoted 4 lines · Miaohe Lin
Use helper macro
__ATTR_RWto definehyp_sysfs_attrto make code more clear. Minor readability improvement.Signed-off-by Miaohe Lin <[email protected]>
Reviewed-by Juergen Gross <[email protected]>
Juergen