Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1512046
| From | Jarkko Nikula <jarkko.nikula@bitmer.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 10/15] ASoC: omap-mcbsp: use permission-specific DEVICE_ATTR variants |
| Date | 2016-10-30 12:40 +0100 |
| Message-ID | <sxWD0-42a-3@gated-at.bofh.it> (permalink) |
| References | <sxHXj-2qm-3@gated-at.bofh.it> <sxHXj-2qm-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi On Sat, 29 Oct 2016 21:37:04 +0200 Julia Lawall <Julia.Lawall@lip6.fr> wrote: > Use DEVICE_ATTR_RW for read-write attributes. This simplifies the > source code, improves readbility, and reduces the chance of > inconsistencies. > ... > > - DEVICE_ATTR(x, \(0644\|S_IRUGO|S_IWUSR\), x_show, x_store); > + DEVICE_ATTR_RW(x); I'm not so sure does this improve readability. 644 is pretty obvious but for DEVICE_ATTR_RW() one has to dive into include/linux/device.h and include/linux/sysfs.h to see for what users it grants the write access. -- Jarkko
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 10/15] ASoC: omap-mcbsp: use permission-specific DEVICE_ATTR variants Julia Lawall <Julia.Lawall@lip6.fr> - 2016-10-29 22:00 +0200
Re: [PATCH 10/15] ASoC: omap-mcbsp: use permission-specific DEVICE_ATTR variants Jarkko Nikula <jarkko.nikula@bitmer.com> - 2016-10-30 12:40 +0100
Re: [PATCH 10/15] ASoC: omap-mcbsp: use permission-specific DEVICE_ATTR variants Julia Lawall <julia.lawall@lip6.fr> - 2016-10-30 13:00 +0100
csiph-web