* [PATCH] drivers/xen: use helper macro __ATTR_RW
@ 2022-03-05 13:38 zhanglianjie
2022-03-05 13:55 ` Greg Kroah-Hartman
2022-03-11 14:21 ` Boris Ostrovsky
0 siblings, 2 replies; 4+ messages in thread
From: zhanglianjie @ 2022-03-05 13:38 UTC (permalink / raw)
To: Juergen Gross, David Vrabel
Cc: Greg Kroah-Hartman, Boris Ostrovsky, Stefano Stabellini,
xen-devel, linux-kernel, Konrad Rzeszutek Wilk, zhanglianjie
Use helper macro __ATTR_RW to define HYPERVISOR_ATTR_RW to make code more clear.
Minor readability improvement.
Signed-off-by: zhanglianjie <zhanglianjie@uniontech.com>
diff --git a/drivers/xen/sys-hypervisor.c b/drivers/xen/sys-hypervisor.c
index feb1d16252e7..fcb0792f090e 100644
--- a/drivers/xen/sys-hypervisor.c
+++ b/drivers/xen/sys-hypervisor.c
@@ -22,11 +22,10 @@
#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;
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drivers/xen: use helper macro __ATTR_RW
2022-03-05 13:38 [PATCH] drivers/xen: use helper macro __ATTR_RW zhanglianjie
@ 2022-03-05 13:55 ` Greg Kroah-Hartman
[not found] ` <622382f3.1c69fb81.55f81.aff0SMTPIN_ADDED_BROKEN@mx.google.com>
2022-03-11 14:21 ` Boris Ostrovsky
1 sibling, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2022-03-05 13:55 UTC (permalink / raw)
To: zhanglianjie
Cc: Juergen Gross, David Vrabel, Boris Ostrovsky, Stefano Stabellini,
xen-devel, linux-kernel, Konrad Rzeszutek Wilk
On Sat, Mar 05, 2022 at 09:38:23PM +0800, zhanglianjie wrote:
> Use helper macro __ATTR_RW to define HYPERVISOR_ATTR_RW to make code more clear.
> Minor readability improvement.
>
> Signed-off-by: zhanglianjie <zhanglianjie@uniontech.com>
Is this the name you sign legal documents with? (I have to ask...)
>
> diff --git a/drivers/xen/sys-hypervisor.c b/drivers/xen/sys-hypervisor.c
> index feb1d16252e7..fcb0792f090e 100644
> --- a/drivers/xen/sys-hypervisor.c
> +++ b/drivers/xen/sys-hypervisor.c
> @@ -22,11 +22,10 @@
> #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)
Why change this line? That's not relevant to this change :(
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drivers/xen: use helper macro __ATTR_RW
[not found] ` <622382f3.1c69fb81.55f81.aff0SMTPIN_ADDED_BROKEN@mx.google.com>
@ 2022-03-05 19:42 ` Greg Kroah-Hartman
0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2022-03-05 19:42 UTC (permalink / raw)
To: zhanglianjie
Cc: Juergen Gross, David Vrabel, Boris Ostrovsky, Stefano Stabellini,
xen-devel, linux-kernel, Konrad Rzeszutek Wilk
On Sat, Mar 05, 2022 at 11:33:58PM +0800, zhanglianjie wrote:
> Hi,
>
> 在 2022/3/5 21:55, Greg Kroah-Hartman 写道:
> > On Sat, Mar 05, 2022 at 09:38:23PM +0800, zhanglianjie wrote:
> > > Use helper macro __ATTR_RW to define HYPERVISOR_ATTR_RW to make code more clear.
> > > Minor readability improvement.
> > >
> > > Signed-off-by: zhanglianjie <zhanglianjie@uniontech.com>
> >
> > Is this the name you sign legal documents with? (I have to ask...)
> Yes, this is my signature.
> >
> > >
> > > diff --git a/drivers/xen/sys-hypervisor.c b/drivers/xen/sys-hypervisor.c
> > > index feb1d16252e7..fcb0792f090e 100644
> > > --- a/drivers/xen/sys-hypervisor.c
> > > +++ b/drivers/xen/sys-hypervisor.c
> > > @@ -22,11 +22,10 @@
> > > #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)
> >
> > Why change this line? That's not relevant to this change :(
> >
> There are two spaces between struct hyp_sysfs_attr and _name, by the way,
> modify it.
Coding style cleanups should be a separate patch, as each change should
only do one logical thing.
But hey, I'm not the maintainer of this file/driver, others might be
more lax.
good luck!
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drivers/xen: use helper macro __ATTR_RW
2022-03-05 13:38 [PATCH] drivers/xen: use helper macro __ATTR_RW zhanglianjie
2022-03-05 13:55 ` Greg Kroah-Hartman
@ 2022-03-11 14:21 ` Boris Ostrovsky
1 sibling, 0 replies; 4+ messages in thread
From: Boris Ostrovsky @ 2022-03-11 14:21 UTC (permalink / raw)
To: zhanglianjie, Juergen Gross, David Vrabel
Cc: Greg Kroah-Hartman, Stefano Stabellini, xen-devel, linux-kernel,
Konrad Rzeszutek Wilk
On 3/5/22 8:38 AM, zhanglianjie wrote:
> Use helper macro __ATTR_RW to define HYPERVISOR_ATTR_RW to make code more clear.
> Minor readability improvement.
>
> Signed-off-by: zhanglianjie <zhanglianjie@uniontech.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Applied to for-linus-5.18 (with whitespace change noted in commit message)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-03-11 14:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-05 13:38 [PATCH] drivers/xen: use helper macro __ATTR_RW zhanglianjie
2022-03-05 13:55 ` Greg Kroah-Hartman
[not found] ` <622382f3.1c69fb81.55f81.aff0SMTPIN_ADDED_BROKEN@mx.google.com>
2022-03-05 19:42 ` Greg Kroah-Hartman
2022-03-11 14:21 ` Boris Ostrovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).