public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Query: How fix: `ide_generic_all_on' defined but not used??
@ 2005-09-22  0:21 Grant Coady
  2005-09-22  0:28 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Grant Coady @ 2005-09-22  0:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm

Hi there,

With 2.6.14-rc2 allmodconfig with CONFIG_ISDN_I4L=n I get:

drivers/ide/pci/generic.c:45: warning: `ide_generic_all_on' defined but not used


Source:
...
static int ide_generic_all;             /* Set to claim all devices */

static int __init ide_generic_all_on(char *unused)
{
        ide_generic_all = 1;
        printk(KERN_INFO "IDE generic will claim all unknown PCI IDE storage controllers.\n");
        return 1;
}

__setup("all-generic-ide", ide_generic_all_on);
...

How to silence this type of warning?


Other "defined but not used" warnings in 2.6.14-rc2 are:

grant@sempro:/opt/linux$ grep "defined but not used" errorlog |cut -d: -f1|sort|uniq
drivers/ide/pci/generic.c
drivers/net/cs89x0.c		appears okay?
drivers/scsi/BusLogic.c		caller is '#if 0' out, but is nightmare code ;)
drivers/scsi/NCR5380.c		heaps of 'em, me not go there
drivers/scsi/NCR53c406a.c	[0]
drivers/scsi/fd_mcs.c		[0]
drivers/scsi/fdomain.c		appears okay? nested #ifdef -> hard to tell
drivers/scsi/ncr53c8xx.c	[0]
drivers/video/fbmem.c		[0]

[0] similar to drivers/ide/pci/generic.c above


Query: "< > Old ISDN4Linux (obsolete)" (CONFIG_ISDN_I4L) turned off to get 
compile completion, should this be marked BROKEN in Kconfig?

Thanks,
Grant.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Query: How fix: `ide_generic_all_on' defined but not used??
  2005-09-22  0:21 Query: How fix: `ide_generic_all_on' defined but not used?? Grant Coady
@ 2005-09-22  0:28 ` Andrew Morton
  2005-09-22  1:06   ` Coywolf Qi Hunt
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2005-09-22  0:28 UTC (permalink / raw)
  To: gcoady; +Cc: grant_lkml, linux-kernel

Grant Coady <grant_lkml@dodo.com.au> wrote:
>
> drivers/ide/pci/generic.c:45: warning: `ide_generic_all_on' defined but not used
> 
> 
>  Source:
>  ...
>  static int ide_generic_all;             /* Set to claim all devices */
> 
>  static int __init ide_generic_all_on(char *unused)
>  {
>          ide_generic_all = 1;
>          printk(KERN_INFO "IDE generic will claim all unknown PCI IDE storage controllers.\n");
>          return 1;
>  }
> 
>  __setup("all-generic-ide", ide_generic_all_on);
>  ...
> 
>  How to silence this type of warning?

You could try poking around in the __setup() definition, using
__attribute_used__, perhaps.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Query: How fix: `ide_generic_all_on' defined but not used??
  2005-09-22  0:28 ` Andrew Morton
@ 2005-09-22  1:06   ` Coywolf Qi Hunt
  0 siblings, 0 replies; 3+ messages in thread
From: Coywolf Qi Hunt @ 2005-09-22  1:06 UTC (permalink / raw)
  To: Andrew Morton; +Cc: gcoady, grant_lkml, linux-kernel

On 9/22/05, Andrew Morton <akpm@osdl.org> wrote:
> Grant Coady <grant_lkml@dodo.com.au> wrote:
> >
> > drivers/ide/pci/generic.c:45: warning: `ide_generic_all_on' defined but not used
> >
> >
> >  Source:
> >  ...
> >  static int ide_generic_all;             /* Set to claim all devices */
> >
> >  static int __init ide_generic_all_on(char *unused)
> >  {
> >          ide_generic_all = 1;
> >          printk(KERN_INFO "IDE generic will claim all unknown PCI IDE storage controllers.\n");
> >          return 1;
> >  }
> >
> >  __setup("all-generic-ide", ide_generic_all_on);
> >  ...
> >
> >  How to silence this type of warning?
>
> You could try poking around in the __setup() definition, using
> __attribute_used__, perhaps.
>

Weird, we have many such things, but we don't get this warning there.
Look at __setup() in main.c.
--
Coywolf Qi Hunt
http://sosdg.org/~coywolf/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-09-22  1:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-22  0:21 Query: How fix: `ide_generic_all_on' defined but not used?? Grant Coady
2005-09-22  0:28 ` Andrew Morton
2005-09-22  1:06   ` Coywolf Qi Hunt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox