* [PATCH] cris: Convert ffs from an object-like macro to a function-like macro
@ 2014-03-10 13:22 Geert Uytterhoeven
2014-03-11 8:43 ` Jesper Nilsson
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2014-03-10 13:22 UTC (permalink / raw)
To: Mikael Starvik, Jesper Nilsson
Cc: Andrew Morton, linux-cris-kernel, linux-kernel,
Geert Uytterhoeven
This avoids bad interactions with code using identifiers called "ffs":
drivers/usb/gadget/f_fs.c: In function 'ffsmod_init':
drivers/usb/gadget/f_fs.c:2693:494: error: 'ffsusb_func' undeclared (first use in this function)
drivers/usb/gadget/f_fs.c:2693:494: note: each undeclared identifier is reported only once for each function it appears in
drivers/usb/gadget/f_fs.c: In function 'ffsmod_exit':
drivers/usb/gadget/f_fs.c:2693:677: error: 'ffsusb_func' undeclared (first use in this function)
drivers/usb/gadget/f_fs.c: At top level:
drivers/usb/gadget/f_fs.c:2693:35: warning: 'kernel_ffsusb_func' defined but not used [-Wunused-variable]
drivers/usb/gadget/f_fs.c: In function 'ffsmod_init':
drivers/usb/gadget/f_fs.c:2693:15: warning: control reaches end of non-void function [-Wreturn-type]
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
http://kisskb.ellerman.id.au/kisskb/buildresult/10715817/
arch/cris/include/asm/bitops.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/cris/include/asm/bitops.h b/arch/cris/include/asm/bitops.h
index 184066ceb1f6..053c17b36559 100644
--- a/arch/cris/include/asm/bitops.h
+++ b/arch/cris/include/asm/bitops.h
@@ -144,7 +144,7 @@ static inline int test_and_change_bit(int nr, volatile unsigned long *addr)
* definition, which doesn't have the same semantics. We don't want to
* use -fno-builtin, so just hide the name ffs.
*/
-#define ffs kernel_ffs
+#define ffs(x) kernel_ffs(x)
#include <asm-generic/bitops/fls.h>
#include <asm-generic/bitops/__fls.h>
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cris: Convert ffs from an object-like macro to a function-like macro
2014-03-10 13:22 [PATCH] cris: Convert ffs from an object-like macro to a function-like macro Geert Uytterhoeven
@ 2014-03-11 8:43 ` Jesper Nilsson
0 siblings, 0 replies; 2+ messages in thread
From: Jesper Nilsson @ 2014-03-11 8:43 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Mikael Starvik, Jesper Nilsson, Andrew Morton, linux-cris-kernel,
linux-kernel@vger.kernel.org
On Mon, Mar 10, 2014 at 02:22:13PM +0100, Geert Uytterhoeven wrote:
> This avoids bad interactions with code using identifiers called "ffs":
>
> drivers/usb/gadget/f_fs.c: In function 'ffsmod_init':
> drivers/usb/gadget/f_fs.c:2693:494: error: 'ffsusb_func' undeclared (first use in this function)
> drivers/usb/gadget/f_fs.c:2693:494: note: each undeclared identifier is reported only once for each function it appears in
> drivers/usb/gadget/f_fs.c: In function 'ffsmod_exit':
> drivers/usb/gadget/f_fs.c:2693:677: error: 'ffsusb_func' undeclared (first use in this function)
> drivers/usb/gadget/f_fs.c: At top level:
> drivers/usb/gadget/f_fs.c:2693:35: warning: 'kernel_ffsusb_func' defined but not used [-Wunused-variable]
> drivers/usb/gadget/f_fs.c: In function 'ffsmod_init':
> drivers/usb/gadget/f_fs.c:2693:15: warning: control reaches end of non-void function [-Wreturn-type]
Yup, quite right. Andrew already added it to his queue,
but for the mailing archives here's my:
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
/^JN - Jesper Nilsson
--
Jesper Nilsson -- jesper.nilsson@axis.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-11 8:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-10 13:22 [PATCH] cris: Convert ffs from an object-like macro to a function-like macro Geert Uytterhoeven
2014-03-11 8:43 ` Jesper Nilsson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox