(Adding Al Viro and linux-fsdevel, dropping Mark Brown and the SPI list, because this is heading off in a different direction now) On Wed, 20 Aug 2014 22:26:02 +0200, Pavel Machek said: > On Wed 2014-08-06 14:27:20, Valdis.Kletnieks@xxxxxx wrote: > > On Wed, 06 Aug 2014 13:53:17 -0400, Nick Krause said: > > > Remove unused definition which cause the following warnings > > > > > > drivers/spi/spi-omap-100k.c:73:0: warning: "WRITE" redefined [enabled by default] > > > include/linux/fs.h:193:0: note: this is the location of the previous definition > > > drivers/spi/spi-omap-100k.c:74:0: warning: "READ" redefined [enabled by default] > > > include/linux/fs.h:192:0: note: this is the location of the previous definition > > > > > -#define WRITE 0 > > > -#define READ 1 > > > > NAK. Full stop. These are potentially used in an inner macro someplace, and by > > removing these, the conflicting values from fs.h will be used instead. > > > > #define READ 0 > > #define WRITE RW_MASK > > > > So if there *is* a use in an inner macro, you just screwed the pooch > > and introduced a bug in this "clean up" - somebody will be expecting to see > > a 0 for a READ, and will receive a 1 instead. This can't end well. > > Actually.. having macros called READ and WRITE in fs.h is already something I'd say > can't end well. Can we rename those? I had the same thought, but other than a test rename to XYZZY_READ and PLUGH_WRITE and doing a 'make allmodconfig' and seeing what throws an error, I'm not sure how to track down all the users. On my fairly stripped-down .config, I have: [/usr/src/linux-next] find * -name '.*.cmd' | wc -l 4671 [/usr/src/linux-next] find * -name '.*.cmd' | xargs grep include/linux/fs.h | wc -l 2339 Which is telling me that pretty much half the world ends up including fs.h indirectly. Now for the mandatory bikeshedding: What do we want to rename them to? :)
Attachment:
pgpAt0aeTuB_t.pgp
Description: PGP signature