linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jaswinder Singh Rajput <jaswinderlinux@gmail.com>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-input@vger.kernel.org, marcel@holtmann.org,
	linux-kernel@vger.kernel.org, anssi.hannula@gmail.com,
	gregkh@suse.de, Sam Ravnborg <sam@ravnborg.org>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH 09/10] HID: add compat support
Date: Sat, 24 Jan 2009 11:25:27 +0530	[thread overview]
Message-ID: <3f9a31f40901232155q7f898f00l9a1cf16ca6c8fb75@mail.gmail.com> (raw)
In-Reply-To: <1210931362-18422-9-git-send-email-jirislaby@gmail.com>

On Fri, May 16, 2008 at 3:19 PM, Jiri Slaby <jirislaby@gmail.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@gmail.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

  parent reply	other threads:[~2009-01-24  5:55 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-16  9:49 [PATCH 01/10] modpost: add support for hid Jiri Slaby
2008-05-16  9:49 ` [PATCH 02/10] HID: make a bus from hid code Jiri Slaby
2008-05-16  9:49   ` [PATCH 03/10] HID: hid, make parsing event driven Jiri Slaby
2008-05-16  9:49     ` [PATCH 04/10] HID: move ids into separate file Jiri Slaby
2008-05-16  9:49       ` [PATCH 05/10] HID: move usage input mapping to hid.h Jiri Slaby
2008-05-16  9:49         ` [PATCH 06/10] HID: move logitech report quirks Jiri Slaby
2008-05-16  9:49           ` [PATCH 07/10] HID: move ignore quirks Jiri Slaby
2008-05-16  9:49             ` [PATCH 08/10] HID: move apple quirks Jiri Slaby
2008-05-16  9:49               ` [PATCH 09/10] HID: add compat support Jiri Slaby
2008-06-04  8:55                 ` Jiri Kosina
2008-06-04  9:00                   ` Jiri Slaby
2009-01-24  5:55                 ` Jaswinder Singh Rajput [this message]
2009-01-25 13:03                   ` Jiri Slaby
2009-01-25 16:57                   ` Jiri Kosina
2009-01-25 17:11                     ` Jaswinder Singh Rajput
2008-06-04 14:13               ` [PATCH 08/10] HID: move apple quirks Jiri Kosina
2008-06-09 10:40                 ` Jiri Slaby
2008-06-04 12:16           ` [PATCH 06/10] HID: move logitech report quirks Jiri Kosina
2008-06-09 10:29             ` Jiri Slaby
2008-06-16 10:15               ` Jiri Kosina
2008-06-04 13:21           ` Jiri Kosina
2008-06-09 10:33             ` Jiri Slaby
2008-06-11 14:13               ` Jiri Kosina
2008-06-11 15:39                 ` Oliver Neukum
2008-06-11 18:35                   ` Jiri Slaby
2008-06-11 18:23                 ` Anssi Hannula
2008-05-19 13:36 ` [PATCH 01/10] modpost: add support for hid Jiri Kosina
2008-05-19 13:38   ` Jiri Slaby
2008-05-19 13:50 ` [PATCH v2] " Jiri Slaby
2008-06-05  9:26 ` [PATCH 01/10] " Jiri Kosina
2008-06-09 10:41   ` Jiri Slaby

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3f9a31f40901232155q7f898f00l9a1cf16ca6c8fb75@mail.gmail.com \
    --to=jaswinderlinux@gmail.com \
    --cc=anssi.hannula@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@suse.de \
    --cc=jirislaby@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=mingo@elte.hu \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).