public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Aishwarya Pant <aishpant@gmail.com>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Joe Perches <joe@perches.com>
Subject: Re: [PATCH 1/5] iio: buffer: use permission specific variants of DEVICE_ATTR
Date: Sat, 6 Jan 2018 14:17:52 +0000	[thread overview]
Message-ID: <20180106141752.7d4e5c93@archlinux> (raw)
In-Reply-To: <alpine.DEB.2.20.1801061418020.2579@hadrien>

On Sat, 6 Jan 2018 14:18:58 +0100 (CET)
Julia Lawall <julia.lawall@lip6.fr> wrote:

> On Sat, 6 Jan 2018, Lars-Peter Clausen wrote:
> 
> > On 01/06/2018 01:35 PM, Jonathan Cameron wrote:  
> > > On Thu, 4 Jan 2018 20:07:14 +0530
> > > Aishwarya Pant <aishpant@gmail.com> wrote:
> > >  
> > >> This is a clean-up patch which replaces DEVICE_ATTR macro with the file
> > >> permission specific DEVICE_ATTR_{RO/WO/RW} macros for compaction and
> > >> readability. Done using coccinelle.  
> > >
> > > Hmm. I'll be honest, I personally really dislike these macros.
> > > They absolutely don't help with readability because they obscure
> > > the connection between the attributes being created and their callbacks.
> > > Short is not the same as more readable.  
> >
> > FWIW fully agreed.  
> 
> Could there be variants that keep the function names as arguments, but
> keep the benefit of the simpler permission specification and ensuring that
> the right functions are provided for the given permissions?

Yes, that would bring the benefits without the readability cost.
No one needs to know that RW means some octal number after all.

Jonathan
> 
> julia
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2018-01-06 14:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-04 14:36 [PATCH 0/5] iio: use permission specific variants of DEVICE_ATTR Aishwarya Pant
2018-01-04 14:37 ` [PATCH 1/5] iio: buffer: " Aishwarya Pant
2018-01-06 12:35   ` Jonathan Cameron
2018-01-06 12:50     ` Lars-Peter Clausen
2018-01-06 13:18       ` Julia Lawall
2018-01-06 14:17         ` Jonathan Cameron [this message]
2018-01-06 15:28     ` Joe Perches
2018-01-04 14:37 ` [PATCH 2/5] iio: core: " Aishwarya Pant
2018-01-04 14:38 ` [PATCH 3/5] iio: trigger: " Aishwarya Pant
2018-01-04 14:38 ` [PATCH 4/5] iio: hrtimer: " Aishwarya Pant
2018-01-04 14:38 ` [PATCH 5/5] iio: trigger: sysfs: use permisssion " Aishwarya Pant
2018-01-04 15:16 ` [PATCH 0/5] iio: use permission " Joe Perches

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=20180106141752.7d4e5c93@archlinux \
    --to=jic23@kernel.org \
    --cc=aishpant@gmail.com \
    --cc=joe@perches.com \
    --cc=julia.lawall@lip6.fr \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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