mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* 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

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®