lkml.org 
[lkml]   [2008]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/6] Werror: Hide warnings on static module device tables
On Thu, May 29, 2008 at 07:17:41PM +0100, David Howells wrote:
> Hide warnings on static module device tables that are produced when compiling a
> driver in to the core kernel rather than compiling it as a module.
>
> This is done by introducing a MODULE_STATIC_DEVICE_TABLE() version of
> MODULE_DEVICE_TABLE() for device ID tables that are declared static. This
> tells the compiler that the table is unused, thus suppressing warnings of the
> type:
>
> mod.c:37: warning: 'id_table' defined but not used
>
> MODULE_STATIC_DEVICE_TABLE() should not be used for non-static tables.
>
> A MODULE_STATIC_GENERIC_TABLE() is also added for the same reason as a version
> of MODULE_GENERIC_TABLE().
>
> This does not automatically cause the table to be emitted by the compiler; that
> will only happen if something references it.
>
> Signed-off-by: David Howells <dhowells@redhat.com>
> ---
>
> drivers/char/ip2/ip2main.c | 2 +-
> drivers/char/rocket.c | 2 +-
> drivers/char/specialix.c | 2 +-
> drivers/isdn/hisax/config.c | 2 +-
> drivers/media/video/zoran_card.c | 2 +-
> drivers/scsi/dpt_i2o.c | 2 +-
> drivers/scsi/fdomain.c | 2 +-
> drivers/scsi/initio.c | 2 +-
> drivers/telephony/ixj.c | 2 +-
> drivers/watchdog/alim1535_wdt.c | 2 +-
> drivers/watchdog/alim7101_wdt.c | 2 +-
> include/linux/module.h | 28 +++++++++++++++++++++++-----
> sound/oss/ad1848.c | 2 +-
>...

Isn't the warning often a reminder that a driver should be updated to
use pci_register_driver() etc. ?

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed



\
 
 \ /
  Last update: 2008-05-29 21:29    [W:0.158 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site