All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Jiri Slaby <jslaby@suse.cz>, stable@vger.kernel.org
Cc: Bryan Kadzban <bryan@kadzban.net>, Jiri Slaby <jslaby@suse.cz>
Subject: Re: [patch added to 3.12-stable] module: remove MODULE_GENERIC_TABLE
Date: Thu, 14 Jan 2016 10:10:32 +1030	[thread overview]
Message-ID: <87wprd59qn.fsf@rustcorp.com.au> (raw)
In-Reply-To: <1452672890-19298-1-git-send-email-jslaby@suse.cz>

Jiri Slaby <jslaby@suse.cz> writes:
> From: Rusty Russell <rusty@rustcorp.com.au>
>
> This patch has been added to the 3.12 stable tree. If you have any
> objections, please let us know.
>
> ===============
>
> commit cff26a51da5d206d3baf871e75778da44710219d upstream.
>
> MODULE_DEVICE_TABLE() calles MODULE_GENERIC_TABLE(); make it do the
> work directly.  This also removes a wart introduced in the last patch,
> where the alias is defined to be an unknown struct type "struct
> type##__##name##_device_id" instead of "struct type##_device_id" (it's
> an extern so GCC doesn't care, but it's wrong).
>
> The other user of MODULE_GENERIC_TABLE (ISAPNP_CARD_TABLE) is unused,
> so delete it.
>
> Bryan: gcc v3.3.2 cares

Hmm, Bryan, your config and the message please?

Thanks,
Rusty.

> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
> Cc: Bryan Kadzban <bryan@kadzban.net>
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> ---
>  include/linux/isapnp.h |  4 ----
>  include/linux/module.h | 19 ++++++++-----------
>  2 files changed, 8 insertions(+), 15 deletions(-)
>
> diff --git a/include/linux/isapnp.h b/include/linux/isapnp.h
> index e2d28b026a8c..3c77bf9b1efd 100644
> --- a/include/linux/isapnp.h
> +++ b/include/linux/isapnp.h
> @@ -56,10 +56,6 @@
>  #define ISAPNP_DEVICE_ID(_va, _vb, _vc, _function) \
>  		{ .vendor = ISAPNP_VENDOR(_va, _vb, _vc), .function = ISAPNP_FUNCTION(_function) }
>  
> -/* export used IDs outside module */
> -#define ISAPNP_CARD_TABLE(name) \
> -		MODULE_GENERIC_TABLE(isapnp_card, name)
> -
>  struct isapnp_card_id {
>  	unsigned long driver_data;	/* data private to the driver */
>  	unsigned short card_vendor, card_device;
> diff --git a/include/linux/module.h b/include/linux/module.h
> index 54aef1b38463..73c8c06c25bf 100644
> --- a/include/linux/module.h
> +++ b/include/linux/module.h
> @@ -83,15 +83,6 @@ void sort_extable(struct exception_table_entry *start,
>  void sort_main_extable(void);
>  void trim_init_extable(struct module *m);
>  
> -#ifdef MODULE
> -#define MODULE_GENERIC_TABLE(gtype,name)			\
> -extern const struct gtype##_id __mod_##gtype##_table		\
> -  __attribute__ ((unused, alias(__stringify(name))))
> -
> -#else  /* !MODULE */
> -#define MODULE_GENERIC_TABLE(gtype,name)
> -#endif
> -
>  /* Generic info of form tag = "info" */
>  #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
>  
> @@ -142,8 +133,14 @@ extern const struct gtype##_id __mod_##gtype##_table		\
>  /* What your module does. */
>  #define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description)
>  
> -#define MODULE_DEVICE_TABLE(type,name)		\
> -  MODULE_GENERIC_TABLE(type##__##name##_device, name)
> +#ifdef MODULE
> +/* Creates an alias so file2alias.c can find device table. */
> +#define MODULE_DEVICE_TABLE(type, name)					\
> +  extern const struct type##_device_id __mod_##type##__##name##_device_table \
> +  __attribute__ ((unused, alias(__stringify(name))))
> +#else  /* !MODULE */
> +#define MODULE_DEVICE_TABLE(type, name)
> +#endif
>  
>  /* Version of form [<epoch>:]<version>[-<extra-version>].
>     Or for CVS/RCS ID version, everything but the number is stripped.
> -- 
> 2.7.0

  reply	other threads:[~2016-01-14  0:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-13  8:14 [patch added to 3.12-stable] module: remove MODULE_GENERIC_TABLE Jiri Slaby
2016-01-13 23:40 ` Rusty Russell [this message]
2016-01-14  7:15   ` Bryan Kadzban

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=87wprd59qn.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=bryan@kadzban.net \
    --cc=jslaby@suse.cz \
    --cc=stable@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.