Thread (10 messages) 10 messages, 4 authors, 2009-02-06

Re: [PATCH] HID: avoid sparse warning in HID_COMPAT_LOAD_DRIVER

From: Ben Dooks <ben-linux@fluff.org>
Date: 2008-12-16 19:41:40
Also in: kernel-janitors, lkml

On Tue, Dec 16, 2008 at 05:01:38PM +0100, Jiri Kosina wrote:
On Tue, 16 Dec 2008, Ben Dooks wrote:
quoted
quoted
 #ifdef CONFIG_HID_COMPAT
 #define HID_COMPAT_LOAD_DRIVER(name)	\
+/* prototype to avoid sparse warning */	\
+extern void hid_compat_##name(void);	\
 void hid_compat_##name(void) { }	\
surely this could simply be changed to 'static void 
hid_compat_##name(void)' if it is only being defined to be an empty 
This will cause gcc emit warnings about unused symbols.
sorry, 'static inline void' then.
 
-- 
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
-- 
Ben (ben@fluff.org, http://www.fluff.org/)

  'a smiley only costs 4 bytes'
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help