lkml.org 
[lkml]   [2022]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] xen: use helper macro __ATTR_RW
Date
Use helper macro __ATTR_RW to define hyp_sysfs_attr to make code more
clear. Minor readability improvement.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
drivers/xen/sys-hypervisor.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/xen/sys-hypervisor.c b/drivers/xen/sys-hypervisor.c
index feb1d16252e7..5e842c88a13e 100644
--- a/drivers/xen/sys-hypervisor.c
+++ b/drivers/xen/sys-hypervisor.c
@@ -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;
--
2.23.0
\
 
 \ /
  Last update: 2022-02-22 12:14    [W:0.189 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site