From: Greg KH <gregkh@linuxfoundation.org>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Himanshi Jain <himshijain.hj@gmail.com>,
devel@driverdev.osuosl.org, daniel.baluta@gmail.com,
lars@metafoo.de, Michael.Hennerich@analog.com,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
nick.desaulniers@gmail.com, outreachy-kernel@googlegroups.com,
pmeerw@pmeerw.net, knaack.h@gmx.de
Subject: Re: [PATCH v2 1/2] include: linux: sysfs: Add __ATTR_NAMED macro
Date: Wed, 13 Sep 2017 11:58:05 -0700 [thread overview]
Message-ID: <20170913185805.GB26390@kroah.com> (raw)
In-Reply-To: <20170913180310.27cbf1b1@archlinux>
On Wed, Sep 13, 2017 at 06:03:10PM +0100, Jonathan Cameron wrote:
> On Wed, 13 Sep 2017 14:14:07 +0530
> Himanshi Jain <himshijain.hj@gmail.com> wrote:
>
> > Add __ATTR_NAMED macro similar to __ATTR but taking name as a
> > string instead of implicit conversion of argument to string using
> > the macro _stringify(_name).
> >
> > Signed-off-by: Himanshi Jain <himshijain.hj@gmail.com>
> > ---
> > include/linux/sysfs.h | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
> > index aa02c32..20321cf 100644
> > --- a/include/linux/sysfs.h
> > +++ b/include/linux/sysfs.h
> > @@ -104,6 +104,13 @@ struct attribute_group {
> > .store = _store, \
> > }
> >
> > +#define __ATTR_NAMED(_name, _mode, _show, _store) { \
>
> I'm not sure about the naming here. The normal __ATTR macro is also
> 'named'. Maybe something as awful as
>
> __ATTR_STRING_NAME ?
>
> Greg what do you think?
ick ick ick.
> This is all to allow us to have names with operators in them without
> checkpatch complaining about them... A worthwhile aim just to stop
> more people wasting time trying to 'fix' those cases by adding spaces.
Yeah, but this really seems "heavy" for just a crazy sysfs name in a
macro. Adding a whole new "core" define for that is a hard sell...
I also want to get rid of the "generic" __ATTR type macros, and force
people to use the proper _RW and friends instead. I don't want to add
another new one that people will start to use that I later have to
change...
So no, I don't like this, how about just changing your macros instead?
No one else has this problem :)
thanks,
greg k-h
next prev parent reply other threads:[~2017-09-13 18:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-13 8:42 [PATCH v2 0/2] Rewrite the IIO_DEVICE_ATTR_NAMED API to pass name as string Himanshi Jain
2017-09-13 8:44 ` [PATCH v2 1/2] include: linux: sysfs: Add __ATTR_NAMED macro Himanshi Jain
2017-09-13 8:44 ` [PATCH v2 2/2] iio: Change to __ATTR_NAMED() Himanshi Jain
2017-09-13 17:03 ` [PATCH v2 1/2] include: linux: sysfs: Add __ATTR_NAMED macro Jonathan Cameron
2017-09-13 18:58 ` Greg KH [this message]
2017-09-13 19:23 ` Lars-Peter Clausen
2017-09-13 20:50 ` Jonathan Cameron
2017-09-18 10:49 ` Himanshi Jain
2017-09-21 13:54 ` Jonathan Cameron
2017-09-21 14:07 ` [Outreachy kernel] " Julia Lawall
2017-09-13 21:29 ` Greg KH
2017-09-13 21:43 ` Dan Carpenter
2017-09-13 21:58 ` Joe Perches
2017-09-13 23:16 ` Jonathan Cameron
2017-09-14 5:10 ` [Outreachy kernel] " Julia Lawall
2017-09-19 12:13 ` Lars-Peter Clausen
2017-09-13 8:46 ` [Outreachy kernel] [PATCH v2 0/2] Rewrite the IIO_DEVICE_ATTR_NAMED API to pass name as string Julia Lawall
2017-09-13 17:04 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170913185805.GB26390@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=Michael.Hennerich@analog.com \
--cc=daniel.baluta@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=himshijain.hj@gmail.com \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nick.desaulniers@gmail.com \
--cc=outreachy-kernel@googlegroups.com \
--cc=pmeerw@pmeerw.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox