* READ/WRITE definitions in drivers/spi/spi-omap-100k.c
@ 2013-10-24 12:46 Tejun Heo
2013-10-29 13:34 ` Linus Walleij
0 siblings, 1 reply; 3+ messages in thread
From: Tejun Heo @ 2013-10-24 12:46 UTC (permalink / raw)
To: Grant Likely; +Cc: Wolfram Sang, Linus Walleij, linux-kernel
Hey, guys.
I was modifying includes in a core header file and got duplicate macro
definition warnings on READ / WRITE in drivers/spi/spi-omap-100k.c.
Apparently that driver defines READ / WRITE as macros and assigns the
opposite values to them from the usual READ / WRITE constants defined
in include/linux/fs.h.
I just skimmed through it and there doesn't seem to be any user of the
macros. Can we *please* remove these? Please note that READ / WRITE
defined in include/linux/fs.h is something which is widely used
throughout the kernel and there are multiple interfaces which take
those constants. Re-defining them in the other way around in a driver
file can lead to subtle issues and just is a bad idea. In general,
refraining from using generic symbols without any qualitification in
low level drivers would be nice.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: READ/WRITE definitions in drivers/spi/spi-omap-100k.c
2013-10-24 12:46 READ/WRITE definitions in drivers/spi/spi-omap-100k.c Tejun Heo
@ 2013-10-29 13:34 ` Linus Walleij
2013-10-29 16:24 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2013-10-29 13:34 UTC (permalink / raw)
To: Tejun Heo, Mark Brown, darkstar6262
Cc: Grant Likely, Wolfram Sang, linux-kernel, ext Tony Lindgren
On Thu, Oct 24, 2013 at 2:46 PM, Tejun Heo <tj@kernel.org> wrote:
> Hey, guys.
>
> I was modifying includes in a core header file and got duplicate macro
> definition warnings on READ / WRITE in drivers/spi/spi-omap-100k.c.
> Apparently that driver defines READ / WRITE as macros and assigns the
> opposite values to them from the usual READ / WRITE constants defined
> in include/linux/fs.h.
>
> I just skimmed through it and there doesn't seem to be any user of the
> macros. Can we *please* remove these? Please note that READ / WRITE
> defined in include/linux/fs.h is something which is widely used
> throughout the kernel and there are multiple interfaces which take
> those constants. Re-defining them in the other way around in a driver
> file can lead to subtle issues and just is a bad idea. In general,
> refraining from using generic symbols without any qualitification in
> low level drivers would be nice.
That seems like a good idea, but we better poke the people who wrote
the code and the SPI maintainer :-)
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: READ/WRITE definitions in drivers/spi/spi-omap-100k.c
2013-10-29 13:34 ` Linus Walleij
@ 2013-10-29 16:24 ` Mark Brown
0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2013-10-29 16:24 UTC (permalink / raw)
To: Linus Walleij
Cc: Tejun Heo, darkstar6262, Grant Likely, Wolfram Sang,
linux-kernel, ext Tony Lindgren
[-- Attachment #1: Type: text/plain, Size: 194 bytes --]
On Tue, Oct 29, 2013 at 02:34:26PM +0100, Linus Walleij wrote:
> That seems like a good idea, but we better poke the people who wrote
> the code and the SPI maintainer :-)
...or send a patch?
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-29 16:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-24 12:46 READ/WRITE definitions in drivers/spi/spi-omap-100k.c Tejun Heo
2013-10-29 13:34 ` Linus Walleij
2013-10-29 16:24 ` Mark Brown
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®