[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3f9a31f40901232155q7f898f00l9a1cf16ca6c8fb75@mail.gmail.com>
Date: Sat, 24 Jan 2009 11:25:27 +0530
From: Jaswinder Singh Rajput <jaswinderlinux@...il.com>
To: Jiri Slaby <jirislaby@...il.com>
Cc: Jiri Kosina <jkosina@...e.cz>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
linux-input@...r.kernel.org, marcel@...tmann.org,
linux-kernel@...r.kernel.org, anssi.hannula@...il.com,
gregkh@...e.de, Sam Ravnborg <sam@...nborg.org>,
Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH 09/10] HID: add compat support
On Fri, May 16, 2008 at 3:19 PM, Jiri Slaby <jirislaby@...il.com> wrote:
> Add compat option to hid code to allow loading of all modules on
> systems which don't allow autoloading because of old userspace.
>
> Signed-off-by: Jiri Slaby <jirislaby@...il.com>
> ---
> Documentation/feature-removal-schedule.txt | 7 +++++++
> drivers/hid/Kconfig | 11 +++++++++++
> drivers/hid/Makefile | 4 ++++
> drivers/hid/hid-apple.c | 2 ++
> drivers/hid/hid-core.c | 12 ++++++++++++
> drivers/hid/hid-dummy.c | 13 +++++++++++++
> drivers/hid/hid-logitech.c | 2 ++
> include/linux/hid.h | 17 +++++++++++++++--
> 8 files changed, 66 insertions(+), 2 deletions(-)
> create mode 100644 drivers/hid/hid-dummy.c
>
> diff --git a/include/linux/hid.h b/include/linux/hid.h
> index c67e5fe..447aed9 100644
> --- a/include/linux/hid.h
> +++ b/include/linux/hid.h
> +#ifdef CONFIG_HID_COMPAT
> +#define HID_COMPAT_LOAD_DRIVER(name) \
> +void hid_compat_##name(void) { } \
> +EXPORT_SYMBOL(hid_compat_##name)
> +#else
> +#define HID_COMPAT_LOAD_DRIVER(name)
> +#endif /* HID_COMPAT */
> +#define HID_COMPAT_CALL_DRIVER(name) do { \
> + extern void hid_compat_##name(void); \
> + hid_compat_##name(); \
> +} while (0)
> +
> #endif
>
This leads to 3 headers_check warnings:
usr/include/linux/hid.h:66: leaks CONFIG_HID to userspace where it is not valid
usr/include/linux/hid.h:69: extern's make no sense in userspace
usr/include/linux/hid.h:76: extern's make no sense in userspace
So I am moving whole above block in #ifdef __KEREL__
If you have any objections, then let me know, now it will look like this:
#endif /* HID_FF */
+#ifdef __KERNEL__
#ifdef CONFIG_HID_COMPAT
#define HID_COMPAT_LOAD_DRIVER(name) \
/* prototype to avoid sparse warning */ \
@@ -804,6 +805,7 @@ EXPORT_SYMBOL(hid_compat_##name)
extern void hid_compat_##name(void); \
hid_compat_##name(); \
} while (0)
+#endif /* __KERNEL__ */
#endif
--
JSR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists