mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] xen: use helper macro __ATTR_RW
@ 2022-02-22 11:12 Miaohe Lin
  2022-02-22 12:00 ` Juergen Gross
  0 siblings, 1 reply; 2+ messages in thread
From: Miaohe Lin @ 2022-02-22 11:12 UTC (permalink / raw)
  To: boris.ostrovsky, jgross; +Cc: sstabellini, xen-devel, linux-kernel, linmiaohe

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] xen: use helper macro __ATTR_RW
  2022-02-22 11:12 [PATCH] xen: use helper macro __ATTR_RW Miaohe Lin
@ 2022-02-22 12:00 ` Juergen Gross
  0 siblings, 0 replies; 2+ messages in thread
From: Juergen Gross @ 2022-02-22 12:00 UTC (permalink / raw)
  To: Miaohe Lin, boris.ostrovsky; +Cc: sstabellini, xen-devel, linux-kernel


[-- Attachment #1.1.1: Type: text/plain, Size: 269 bytes --]

On 22.02.22 12:12, Miaohe Lin wrote:
> 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>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3149 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-22 12:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-22 11:12 [PATCH] xen: use helper macro __ATTR_RW Miaohe Lin
2022-02-22 12:00 ` Juergen Gross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®