LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [Patch] Shut up warnings from files under drivers/
@ 2008-01-26  9:30 WANG Cong
  2008-01-26  9:55 ` Jeff Garzik
  2008-01-26  9:57 ` [Patch] Shut up warnings from files under drivers/ Sam Ravnborg
  0 siblings, 2 replies; 22+ messages in thread
From: WANG Cong @ 2008-01-26  9:30 UTC (permalink / raw)
  To: Greg KH; +Cc: LKML, Andrew Morton


Fix two kind of defined-but-not-used warnings.

One is due to defination of MODULE_DEVICE_TABLE, the
other is due to __devexit_p. The solution is just to
add proper directives to protect those usages.

Compile tests passed.

Cc: Greg KH <gregkh@suse.de>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>

---

diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c
index 1f0b752..247bc16 100644
--- a/drivers/char/applicom.c
+++ b/drivers/char/applicom.c
@@ -65,6 +65,7 @@ static char *applicom_pci_devnames[] = {
 	"PCI2000PFB"
 };
 
+#ifdef MODULE
 static struct pci_device_id applicom_pci_tbl[] = {
 	{ PCI_VENDOR_ID_APPLICOM, PCI_DEVICE_ID_APPLICOM_PCIGENERIC,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
@@ -74,6 +75,8 @@ static struct pci_device_id applicom_pci_tbl[] = {
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	{ 0 }
 };
+#endif
+
 MODULE_DEVICE_TABLE(pci, applicom_pci_tbl);
 
 MODULE_AUTHOR("David Woodhouse & Applicom International");
diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c
index 905d1f5..2009dc9 100644
--- a/drivers/char/synclink.c
+++ b/drivers/char/synclink.c
@@ -897,7 +897,9 @@ static char *driver_version = "$Revision: 4.38 $";
 
 static int synclink_init_one (struct pci_dev *dev,
 				     const struct pci_device_id *ent);
+#if defined(MODULE) || defined(CONFIG_HOTPLUG)
 static void synclink_remove_one (struct pci_dev *dev);
+#endif
 
 static struct pci_device_id synclink_pci_tbl[] = {
 	{ PCI_VENDOR_ID_MICROGATE, PCI_DEVICE_ID_MICROGATE_USC, PCI_ANY_ID, PCI_ANY_ID, },
@@ -8166,7 +8168,8 @@ static int __devinit synclink_init_one (struct pci_dev *dev,
 	return 0;
 }
 
+#if defined(MODULE) || defined(CONFIG_HOTPLUG)
 static void __devexit synclink_remove_one (struct pci_dev *dev)
 {
 }
-
+#endif
diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c
index 16413e5..635f651 100644
--- a/drivers/crypto/hifn_795x.c
+++ b/drivers/crypto/hifn_795x.c
@@ -2046,6 +2046,7 @@ static irqreturn_t hifn_interrupt(int irq, void *data)
 	return IRQ_HANDLED;
 }
 
+#if defined(MODULE) || defined(CONFIG_HOTPLUG)
 static void hifn_flush(struct hifn_device *dev)
 {
 	unsigned long flags;
@@ -2073,6 +2074,7 @@ static void hifn_flush(struct hifn_device *dev)
 	}
 	spin_unlock_irqrestore(&dev->lock, flags);
 }
+#endif
 
 static int hifn_setkey(struct crypto_ablkcipher *cipher, const u8 *key,
 		unsigned int len)
@@ -2730,6 +2732,7 @@ err_out_disable_pci_device:
 	return err;
 }
 
+#if defined(MODULE) || defined(CONFIG_HOTPLUG)
 static void hifn_remove(struct pci_dev *pdev)
 {
 	int i;
@@ -2767,6 +2770,7 @@ static void hifn_remove(struct pci_dev *pdev)
 	pci_release_regions(pdev);
 	pci_disable_device(pdev);
 }
+#endif
 
 static struct pci_device_id hifn_pci_tbl[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_HIFN, PCI_DEVICE_ID_HIFN_7955) },
diff --git a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c
index 49cd979..1877084 100644
--- a/drivers/telephony/ixj.c
+++ b/drivers/telephony/ixj.c
@@ -284,11 +284,13 @@ static int samplerate = 100;
 
 module_param(ixjdebug, int, 0);
 
+#ifdef MODULE
 static struct pci_device_id ixj_pci_tbl[] __devinitdata = {
 	{ PCI_VENDOR_ID_QUICKNET, PCI_DEVICE_ID_QUICKNET_XJ,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
 	{ }
 };
+#endif
 
 MODULE_DEVICE_TABLE(pci, ixj_pci_tbl);
 
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
index cbd3308..3a1aa7e 100644
--- a/drivers/video/aty/aty128fb.c
+++ b/drivers/video/aty/aty128fb.c
@@ -165,7 +165,9 @@ static const char *r128_family[] __devinitdata = {
  */
 static int aty128_probe(struct pci_dev *pdev,
                                const struct pci_device_id *ent);
+#if defined(MODULE) || defined(CONFIG_HOTPLUG)
 static void aty128_remove(struct pci_dev *pdev);
+#endif
 static int aty128_pci_suspend(struct pci_dev *pdev, pm_message_t state);
 static int aty128_pci_resume(struct pci_dev *pdev);
 static int aty128_do_resume(struct pci_dev *pdev);
@@ -1844,11 +1846,14 @@ error:
 	return;
 }
 
+#if defined(MODULE) || defined(CONFIG_HOTPLUG)
 static void aty128_bl_exit(struct backlight_device *bd)
 {
 	backlight_device_unregister(bd);
 	printk("aty128: Backlight unloaded\n");
 }
+#endif
+
 #endif /* CONFIG_FB_ATY128_BACKLIGHT */
 
 /*
@@ -2125,6 +2130,7 @@ err_free_fb:
 	return -ENODEV;
 }
 
+#if defined(MODULE) || defined(CONFIG_HOTPLUG)
 static void __devexit aty128_remove(struct pci_dev *pdev)
 {
 	struct fb_info *info = pci_get_drvdata(pdev);
@@ -2155,6 +2161,7 @@ static void __devexit aty128_remove(struct pci_dev *pdev)
 			   pci_resource_len(pdev, 2));
 	framebuffer_release(info);
 }
+#endif /* MODULE || CONFIG_HOTPLUG */
 #endif /* CONFIG_PCI */
 
 
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index d775eb6..eec1624 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -244,7 +244,9 @@ static int atyfb_sync(struct fb_info *info);
      */
 
 static int aty_init(struct fb_info *info);
+#if defined(CONFIG_PM) && defined(CONFIG_PCI)
 static void aty_resume_chip(struct fb_info *info);
+#endif
 #ifdef CONFIG_ATARI
 static int store_video_par(char *videopar, unsigned char m64_num);
 #endif
@@ -2709,6 +2711,7 @@ aty_init_exit:
 	return -1;
 }
 
+#if defined(CONFIG_PM) && defined(CONFIG_PCI)
 static void aty_resume_chip(struct fb_info *info)
 {
 	struct atyfb_par *par = info->par;
@@ -2721,6 +2724,7 @@ static void aty_resume_chip(struct fb_info *info)
 	if (par->aux_start)
 		aty_st_le32(BUS_CNTL, aty_ld_le32(BUS_CNTL, par) | BUS_APER_REG_DIS, par);
 }
+#endif
 
 #ifdef CONFIG_ATARI
 static int __devinit store_video_par(char *video_str, unsigned char m64_num)
diff --git a/drivers/video/imsttfb.c b/drivers/video/imsttfb.c
index 3ab91bf..d0c023d 100644
--- a/drivers/video/imsttfb.c
+++ b/drivers/video/imsttfb.c
@@ -400,7 +400,9 @@ static struct imstt_regvals tvp_reg_init_20 = {
  * PCI driver prototypes
  */
 static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
+#if defined(MODULE) || defined(CONFIG_HOTPLUG)
 static void imsttfb_remove(struct pci_dev *pdev);
+#endif
 
 /*
  * Register access
@@ -1533,6 +1535,7 @@ imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	return 0;
 }
 
+#if defined(MODULE) || defined(CONFIG_HOTPLUG)
 static void __devexit
 imsttfb_remove(struct pci_dev *pdev)
 {
@@ -1547,6 +1550,7 @@ imsttfb_remove(struct pci_dev *pdev)
 	release_mem_region(info->fix.smem_start, size);
 	framebuffer_release(info);
 }
+#endif
 
 #ifndef MODULE
 static int __init
diff --git a/drivers/video/kyro/fbdev.c b/drivers/video/kyro/fbdev.c
index acb9370..437ebd0 100644
--- a/drivers/video/kyro/fbdev.c
+++ b/drivers/video/kyro/fbdev.c
@@ -90,7 +90,9 @@ static int nomtrr __devinitdata = 0;
 
 /* PCI driver prototypes */
 static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
+#if defined(MODULE) || defined(CONFIG_HOTPLUG)
 static void kyrofb_remove(struct pci_dev *pdev);
+#endif
 
 static struct fb_videomode kyro_modedb[] __devinitdata = {
 	{
@@ -754,6 +756,7 @@ out_unmap:
 	return -EINVAL;
 }
 
+#if defined(MODULE) || defined(CONFIG_HOTPLUG)
 static void __devexit kyrofb_remove(struct pci_dev *pdev)
 {
 	struct fb_info *info = pci_get_drvdata(pdev);
@@ -783,6 +786,7 @@ static void __devexit kyrofb_remove(struct pci_dev *pdev)
 	pci_set_drvdata(pdev, NULL);
 	framebuffer_release(info);
 }
+#endif
 
 static int __init kyrofb_init(void)
 {
diff --git a/drivers/watchdog/alim1535_wdt.c b/drivers/watchdog/alim1535_wdt.c
index b481cc0..05ddf80 100644
--- a/drivers/watchdog/alim1535_wdt.c
+++ b/drivers/watchdog/alim1535_wdt.c
@@ -311,11 +311,13 @@ static int ali_notify_sys(struct notifier_block *this, unsigned long code, void
  *	want to register another driver on the same PCI id.
  */
 
+#ifdef MODULE
 static struct pci_device_id ali_pci_tbl[] = {
 	{ PCI_VENDOR_ID_AL, 0x1533, PCI_ANY_ID, PCI_ANY_ID,},
 	{ PCI_VENDOR_ID_AL, 0x1535, PCI_ANY_ID, PCI_ANY_ID,},
 	{ 0, },
 };
+#endif
 MODULE_DEVICE_TABLE(pci, ali_pci_tbl);
 
 /*
diff --git a/drivers/watchdog/alim7101_wdt.c b/drivers/watchdog/alim7101_wdt.c
index 67aed9f..401eead 100644
--- a/drivers/watchdog/alim7101_wdt.c
+++ b/drivers/watchdog/alim7101_wdt.c
@@ -409,11 +409,13 @@ err_out:
 module_init(alim7101_wdt_init);
 module_exit(alim7101_wdt_unload);
 
+#ifdef MODULE
 static struct pci_device_id alim7101_pci_tbl[] __devinitdata = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101) },
 	{ }
 };
+#endif
 
 MODULE_DEVICE_TABLE(pci, alim7101_pci_tbl);
 

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

* Re: [Patch] Shut up warnings from files under drivers/
  2008-01-26  9:30 [Patch] Shut up warnings from files under drivers/ WANG Cong
@ 2008-01-26  9:55 ` Jeff Garzik
  2008-01-26 10:18   ` WANG Cong
  2008-01-26 19:17   ` Sam Ravnborg
  2008-01-26  9:57 ` [Patch] Shut up warnings from files under drivers/ Sam Ravnborg
  1 sibling, 2 replies; 22+ messages in thread
From: Jeff Garzik @ 2008-01-26  9:55 UTC (permalink / raw)
  To: WANG Cong; +Cc: Greg KH, LKML, Andrew Morton

WANG Cong wrote:
> diff --git a/drivers/video/kyro/fbdev.c b/drivers/video/kyro/fbdev.c
> index acb9370..437ebd0 100644
> --- a/drivers/video/kyro/fbdev.c
> +++ b/drivers/video/kyro/fbdev.c
> @@ -90,7 +90,9 @@ static int nomtrr __devinitdata = 0;
>  
>  /* PCI driver prototypes */
>  static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
> +#if defined(MODULE) || defined(CONFIG_HOTPLUG)
>  static void kyrofb_remove(struct pci_dev *pdev);
> +#endif
>  
>  static struct fb_videomode kyro_modedb[] __devinitdata = {
>  	{
> @@ -754,6 +756,7 @@ out_unmap:
>  	return -EINVAL;
>  }
>  
> +#if defined(MODULE) || defined(CONFIG_HOTPLUG)
>  static void __devexit kyrofb_remove(struct pci_dev *pdev)
>  {
>  	struct fb_info *info = pci_get_drvdata(pdev);
> @@ -783,6 +786,7 @@ static void __devexit kyrofb_remove(struct pci_dev *pdev)
>  	pci_set_drvdata(pdev, NULL);
>  	framebuffer_release(info);
>  }
> +#endif


Quite strange -- due to __devexit_p() and the __devexit marker, ifdefs 
should not be needed.

I would look into why that isn't working as designed in these cases...

	Jeff



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

* Re: [Patch] Shut up warnings from files under drivers/
  2008-01-26  9:30 [Patch] Shut up warnings from files under drivers/ WANG Cong
  2008-01-26  9:55 ` Jeff Garzik
@ 2008-01-26  9:57 ` Sam Ravnborg
  2008-01-26 10:15   ` WANG Cong
  2008-01-26 10:21   ` Sam Ravnborg
  1 sibling, 2 replies; 22+ messages in thread
From: Sam Ravnborg @ 2008-01-26  9:57 UTC (permalink / raw)
  To: WANG Cong; +Cc: Greg KH, LKML, Andrew Morton

Hi WANG.
On Sat, Jan 26, 2008 at 05:30:07PM +0800, WANG Cong wrote:
> 
> Fix two kind of defined-but-not-used warnings.
> 
> One is due to defination of MODULE_DEVICE_TABLE, the
> other is due to __devexit_p. The solution is just to
> add proper directives to protect those usages.

Please include the actual warnings that you fix.

> 
> Compile tests passed.
> 
> Cc: Greg KH <gregkh@suse.de>
> Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
> 
> ---
> 
> diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c
> index 1f0b752..247bc16 100644
> --- a/drivers/char/applicom.c
> +++ b/drivers/char/applicom.c
> @@ -65,6 +65,7 @@ static char *applicom_pci_devnames[] = {
>  	"PCI2000PFB"
>  };
>  
> +#ifdef MODULE
>  static struct pci_device_id applicom_pci_tbl[] = {
>  	{ PCI_VENDOR_ID_APPLICOM, PCI_DEVICE_ID_APPLICOM_PCIGENERIC,
>  	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
> @@ -74,6 +75,8 @@ static struct pci_device_id applicom_pci_tbl[] = {
>  	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
>  	{ 0 }
>  };
> +#endif
> +

As replacement for the above I would prefer som kind of annotation
so we can drop the symbol at linker time.
Something like:

>+  static struct pci_device_id applicom_pci_tbl[] __moduseddata = {
>       { PCI_VENDOR_ID_APPLICOM, PCI_DEVICE_ID_APPLICOM_PCIGENERIC,
>         PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
> @@ -74,6 +75,8 @@ static struct pci_device_id applicom_pci_tbl[] = {
>         PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
>       { 0 }
>  };

where we have:
#ifdef MODULE
#define __moduseddata  __section(.module.data)
#define __modusedconst __section(.module.rodata)
#define __modused      __section(.module.text)
#else
#define __moduseddata  __section(.discard.data)
#define __modusedconst __section(.discard.rodata)
#define __modused      __section(.discard.text)
#endif

And we can then discard the symbols as we do for
__initdata today.


Another much simpler solution could be to say:

>static struct pci_device_id applicom_pci_tbl[] __used = {
>       { PCI_VENDOR_ID_APPLICOM, PCI_DEVICE_ID_APPLICOM_PCIGENERIC,
>         PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
> @@ -74,6 +75,8 @@ static struct pci_device_id applicom_pci_tbl[] = {
>         PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
>       { 0 }
>  };

But we would then in the built-in case waste some memory.

> index 905d1f5..2009dc9 100644
> --- a/drivers/char/synclink.c
> +++ b/drivers/char/synclink.c
> @@ -897,7 +897,9 @@ static char *driver_version = "$Revision: 4.38 $";
>  
>  static int synclink_init_one (struct pci_dev *dev,
>  				     const struct pci_device_id *ent);
> +#if defined(MODULE) || defined(CONFIG_HOTPLUG)
>  static void synclink_remove_one (struct pci_dev *dev);
> +#endif
>  
>  static struct pci_device_id synclink_pci_tbl[] = {
>  	{ PCI_VENDOR_ID_MICROGATE, PCI_DEVICE_ID_MICROGATE_USC, PCI_ANY_ID, PCI_ANY_ID, },
> @@ -8166,7 +8168,8 @@ static int __devinit synclink_init_one (struct pci_dev *dev,
>  	return 0;
>  }
>  
> +#if defined(MODULE) || defined(CONFIG_HOTPLUG)
>  static void __devexit synclink_remove_one (struct pci_dev *dev)
>  {
>  }
> -
> +#endif

This function is properly annotated and __devexit_p() is used
so it should not generate a warning.

The root casue is that __devexit is defined to nothing in the
#ifdef CONFIG_HOTPLUG case - it should have been defined as
#define __devexit __used
if MODULE was not defined.

This is the better fix for these kind of warnings.
For the latter I have fixed this in kbuild.git.
So we are only left with the DEVICE_MOD_TABLE issue.

	Sam

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

* Re: [Patch] Shut up warnings from files under drivers/
  2008-01-26  9:57 ` [Patch] Shut up warnings from files under drivers/ Sam Ravnborg
@ 2008-01-26 10:15   ` WANG Cong
  2008-01-26 10:21   ` Sam Ravnborg
  1 sibling, 0 replies; 22+ messages in thread
From: WANG Cong @ 2008-01-26 10:15 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: WANG Cong, Greg KH, LKML, Andrew Morton

On Sat, Jan 26, 2008 at 10:57:23AM +0100, Sam Ravnborg wrote:
>Hi WANG.
>On Sat, Jan 26, 2008 at 05:30:07PM +0800, WANG Cong wrote:
>> 
>> Fix two kind of defined-but-not-used warnings.
>> 
>> One is due to defination of MODULE_DEVICE_TABLE, the
>> other is due to __devexit_p. The solution is just to
>> add proper directives to protect those usages.
>
>Please include the actual warnings that you fix.
>

Sure.

Such as this one:

drivers/char/applicom.c:68: warning: ‘applicom_pci_tbl’ defined but not used

Others are similar.


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

* Re: [Patch] Shut up warnings from files under drivers/
  2008-01-26  9:55 ` Jeff Garzik
@ 2008-01-26 10:18   ` WANG Cong
  2008-01-26 11:44     ` Jeff Garzik
  2008-01-26 19:17   ` Sam Ravnborg
  1 sibling, 1 reply; 22+ messages in thread
From: WANG Cong @ 2008-01-26 10:18 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: WANG Cong, Greg KH, LKML, Andrew Morton

On Sat, Jan 26, 2008 at 04:55:58AM -0500, Jeff Garzik wrote:
>WANG Cong wrote:
>>diff --git a/drivers/video/kyro/fbdev.c b/drivers/video/kyro/fbdev.c
>>index acb9370..437ebd0 100644
>>--- a/drivers/video/kyro/fbdev.c
>>+++ b/drivers/video/kyro/fbdev.c
>>@@ -90,7 +90,9 @@ static int nomtrr __devinitdata = 0;
>> 
>> /* PCI driver prototypes */
>> static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id 
>> *ent);
>>+#if defined(MODULE) || defined(CONFIG_HOTPLUG)
>> static void kyrofb_remove(struct pci_dev *pdev);
>>+#endif
>> 
>> static struct fb_videomode kyro_modedb[] __devinitdata = {
>> 	{
>>@@ -754,6 +756,7 @@ out_unmap:
>> 	return -EINVAL;
>> }
>> 
>>+#if defined(MODULE) || defined(CONFIG_HOTPLUG)
>> static void __devexit kyrofb_remove(struct pci_dev *pdev)
>> {
>> 	struct fb_info *info = pci_get_drvdata(pdev);
>>@@ -783,6 +786,7 @@ static void __devexit kyrofb_remove(struct pci_dev 
>>*pdev)
>> 	pci_set_drvdata(pdev, NULL);
>> 	framebuffer_release(info);
>> }
>>+#endif
>
>
>Quite strange -- due to __devexit_p() and the __devexit marker, ifdefs 
>should not be needed.
>
>I would look into why that isn't working as designed in these cases...
>

For example, the defination of __devexit_p:

#if defined(MODULE) || defined(CONFIG_HOTPLUG)
#define __devexit_p(x) x
#else
#define __devexit_p(x) NULL
#endif

If !(defined(MODULE) || defined(CONFIG_HOTPLUG)), __devexit_p
is just a NULL pointer, thus 'x' may be unused although defined.


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

* Re: [Patch] Shut up warnings from files under drivers/
  2008-01-26  9:57 ` [Patch] Shut up warnings from files under drivers/ Sam Ravnborg
  2008-01-26 10:15   ` WANG Cong
@ 2008-01-26 10:21   ` Sam Ravnborg
  2008-01-26 10:26     ` WANG Cong
  1 sibling, 1 reply; 22+ messages in thread
From: Sam Ravnborg @ 2008-01-26 10:21 UTC (permalink / raw)
  To: WANG Cong; +Cc: Greg KH, LKML, Andrew Morton

> > index 905d1f5..2009dc9 100644
> > --- a/drivers/char/synclink.c
> > +++ b/drivers/char/synclink.c
> > @@ -897,7 +897,9 @@ static char *driver_version = "$Revision: 4.38 $";
> >  
> >  static int synclink_init_one (struct pci_dev *dev,
> >  				     const struct pci_device_id *ent);
> > +#if defined(MODULE) || defined(CONFIG_HOTPLUG)
> >  static void synclink_remove_one (struct pci_dev *dev);
> > +#endif
> >  
> >  static struct pci_device_id synclink_pci_tbl[] = {
> >  	{ PCI_VENDOR_ID_MICROGATE, PCI_DEVICE_ID_MICROGATE_USC, PCI_ANY_ID, PCI_ANY_ID, },
> > @@ -8166,7 +8168,8 @@ static int __devinit synclink_init_one (struct pci_dev *dev,
> >  	return 0;
> >  }
> >  
> > +#if defined(MODULE) || defined(CONFIG_HOTPLUG)
> >  static void __devexit synclink_remove_one (struct pci_dev *dev)
> >  {
> >  }
> > -
> > +#endif
> 
> This function is properly annotated and __devexit_p() is used
> so it should not generate a warning.
> 
> The root casue is that __devexit is defined to nothing in the
> #ifdef CONFIG_HOTPLUG case - it should have been defined as
> #define __devexit __used
> if MODULE was not defined.
> 
> This is the better fix for these kind of warnings.
> For the latter I have fixed this in kbuild.git.
> So we are only left with the DEVICE_MOD_TABLE issue.

Looking a bit closer the above is rubbish.
We have:
#if defined(MODULE) || defined(CONFIG_HOTPLUG)
#define __devexit_p(x) x
#else
#define __devexit_p(x) NULL

so the pointer to the function is used in
both cases.

Could you drop me the config that produces the warning
and the warning message.

Thanks,
	Sam

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

* Re: [Patch] Shut up warnings from files under drivers/
  2008-01-26 10:21   ` Sam Ravnborg
@ 2008-01-26 10:26     ` WANG Cong
  0 siblings, 0 replies; 22+ messages in thread
From: WANG Cong @ 2008-01-26 10:26 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: WANG Cong, Greg KH, LKML, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 415 bytes --]


>
>Looking a bit closer the above is rubbish.
>We have:
>#if defined(MODULE) || defined(CONFIG_HOTPLUG)
>#define __devexit_p(x) x
>#else
>#define __devexit_p(x) NULL
>
>so the pointer to the function is used in
>both cases.

I think in the latter case, 'x' is not used, just
as gcc told me. ;)

>
>Could you drop me the config that produces the warning
>and the warning message.
>

Of course. Attached.

Regards.


[-- Attachment #2: my-config.txt --]
[-- Type: text/plain, Size: 28886 bytes --]

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.24
# Sat Jan 26 10:19:31 2008
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
# CONFIG_X86_64 is not set
CONFIG_X86=y
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_SEMAPHORE_SLEEPERS=y
CONFIG_MMU=y
CONFIG_ZONE_DMA=y
CONFIG_QUICKLIST=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_DMI=y
# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_GENERIC_CALIBRATE_DELAY=y
# CONFIG_GENERIC_TIME_VSYSCALL is not set
CONFIG_ARCH_SUPPORTS_OPROFILE=y
# CONFIG_ZONE_DMA32 is not set
CONFIG_ARCH_POPULATES_NODE_MAP=y
# CONFIG_AUDIT_ARCH is not set
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_X86_BIOS_REBOOT=y
CONFIG_KTIME_SCALAR=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
# CONFIG_SYSVIPC is not set
CONFIG_BSD_PROCESS_ACCT=y
# CONFIG_BSD_PROCESS_ACCT_V3 is not set
CONFIG_USER_NS=y
# CONFIG_PID_NS is not set
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_CGROUPS=y
# CONFIG_CGROUP_DEBUG is not set
CONFIG_CGROUP_NS=y
CONFIG_FAIR_GROUP_SCHED=y
CONFIG_FAIR_USER_SCHED=y
# CONFIG_FAIR_CGROUP_SCHED is not set
CONFIG_CGROUP_CPUACCT=y
# CONFIG_SYSFS_DEPRECATED is not set
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_EMBEDDED=y
CONFIG_UID16=y
# CONFIG_SYSCTL_SYSCALL is not set
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_KALLSYMS_EXTRA_PASS=y
# CONFIG_HOTPLUG is not set
CONFIG_PRINTK=y
# CONFIG_BUG is not set
# CONFIG_ELF_CORE is not set
CONFIG_BASE_FULL=y
# CONFIG_FUTEX is not set
CONFIG_ANON_INODES=y
# CONFIG_EPOLL is not set
CONFIG_SIGNALFD=y
# CONFIG_EVENTFD is not set
# CONFIG_SHMEM is not set
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_SLAB=y
# CONFIG_SLUB is not set
# CONFIG_SLOB is not set
CONFIG_SLABINFO=y
CONFIG_TINY_SHMEM=y
CONFIG_BASE_SMALL=0
# CONFIG_MODULES is not set
# CONFIG_BLOCK is not set
CONFIG_PREEMPT_NOTIFIERS=y
CONFIG_CLASSIC_RCU=y
# CONFIG_PREEMPT_RCU is not set

#
# Processor type and features
#
# CONFIG_TICK_ONESHOT is not set
# CONFIG_NO_HZ is not set
# CONFIG_HIGH_RES_TIMERS is not set
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
# CONFIG_SMP is not set
CONFIG_X86_PC=y
# CONFIG_X86_ELAN is not set
# CONFIG_X86_VOYAGER is not set
# CONFIG_X86_NUMAQ is not set
# CONFIG_X86_SUMMIT is not set
# CONFIG_X86_BIGSMP is not set
# CONFIG_X86_VISWS is not set
# CONFIG_X86_GENERICARCH is not set
# CONFIG_X86_ES7000 is not set
# CONFIG_X86_VSMP is not set
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
# CONFIG_PARAVIRT_GUEST is not set
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMII is not set
# CONFIG_MPENTIUMIII is not set
# CONFIG_MPENTIUMM is not set
# CONFIG_MPENTIUM4 is not set
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
CONFIG_MK8=y
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP2 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MGEODEGX1 is not set
# CONFIG_MGEODE_LX is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_MVIAC7 is not set
# CONFIG_MPSC is not set
# CONFIG_MCORE2 is not set
# CONFIG_GENERIC_CPU is not set
# CONFIG_X86_GENERIC is not set
CONFIG_X86_CMPXCHG=y
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_XADD=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_TSC=y
CONFIG_X86_MINIMUM_CPU_FAMILY=4
CONFIG_HPET_TIMER=y
CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
CONFIG_RCU_TRACE=y
# CONFIG_X86_UP_APIC is not set
# CONFIG_X86_MCE is not set
CONFIG_VM86=y
# CONFIG_TOSHIBA is not set
# CONFIG_I8K is not set
# CONFIG_X86_REBOOTFIXUPS is not set
# CONFIG_MICROCODE is not set
# CONFIG_X86_MSR is not set
# CONFIG_X86_CPUID is not set
# CONFIG_NOHIGHMEM is not set
CONFIG_HIGHMEM4G=y
# CONFIG_HIGHMEM64G is not set
CONFIG_VMSPLIT_3G=y
# CONFIG_VMSPLIT_3G_OPT is not set
# CONFIG_VMSPLIT_2G is not set
# CONFIG_VMSPLIT_2G_OPT is not set
# CONFIG_VMSPLIT_1G is not set
CONFIG_PAGE_OFFSET=0xC0000000
CONFIG_HIGHMEM=y
CONFIG_NEED_NODE_MEMMAP_SIZE=y
CONFIG_ARCH_FLATMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_SELECT_MEMORY_MODEL=y
# CONFIG_FLATMEM_MANUAL is not set
# CONFIG_DISCONTIGMEM_MANUAL is not set
CONFIG_SPARSEMEM_MANUAL=y
CONFIG_SPARSEMEM=y
CONFIG_HAVE_MEMORY_PRESENT=y
CONFIG_SPARSEMEM_STATIC=y
# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_RESOURCES_64BIT=y
CONFIG_ZONE_DMA_FLAG=1
CONFIG_NR_QUICK=1
CONFIG_VIRT_TO_BUS=y
# CONFIG_HIGHPTE is not set
# CONFIG_MATH_EMULATION is not set
CONFIG_MTRR=y
CONFIG_SECCOMP=y
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
CONFIG_HZ_300=y
# CONFIG_HZ_1000 is not set
CONFIG_HZ=300
# CONFIG_SCHED_HRTICK is not set
CONFIG_KEXEC=y
# CONFIG_CRASH_DUMP is not set
CONFIG_PHYSICAL_START=0x200000
CONFIG_RELOCATABLE=y
CONFIG_PHYSICAL_ALIGN=0x200000
# CONFIG_COMPAT_VDSO is not set
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y

#
# Power management options
#
# CONFIG_PM is not set
CONFIG_SUSPEND_UP_POSSIBLE=y
CONFIG_HIBERNATION_UP_POSSIBLE=y

#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
# CONFIG_CPU_FREQ_DEBUG is not set
CONFIG_CPU_FREQ_STAT=y
# CONFIG_CPU_FREQ_STAT_DETAILS is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set

#
# CPUFreq processor drivers
#
# CONFIG_X86_POWERNOW_K6 is not set
# CONFIG_X86_POWERNOW_K7 is not set
# CONFIG_X86_POWERNOW_K8 is not set
# CONFIG_X86_GX_SUSPMOD is not set
# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
# CONFIG_X86_SPEEDSTEP_ICH is not set
# CONFIG_X86_SPEEDSTEP_SMI is not set
# CONFIG_X86_P4_CLOCKMOD is not set
# CONFIG_X86_CPUFREQ_NFORCE2 is not set
# CONFIG_X86_LONGRUN is not set
# CONFIG_X86_E_POWERSAVER is not set

#
# shared options
#
# CONFIG_X86_SPEEDSTEP_LIB is not set
# CONFIG_CPU_IDLE is not set

#
# Bus options (PCI etc.)
#
CONFIG_PCI=y
# CONFIG_PCI_GOBIOS is not set
# CONFIG_PCI_GOMMCONFIG is not set
# CONFIG_PCI_GODIRECT is not set
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_DOMAINS=y
CONFIG_PCIEPORTBUS=y
# CONFIG_PCIEAER is not set
# CONFIG_ARCH_SUPPORTS_MSI is not set
CONFIG_PCI_LEGACY=y
CONFIG_PCI_DEBUG=y
CONFIG_ISA_DMA_API=y
# CONFIG_ISA is not set
# CONFIG_MCA is not set
# CONFIG_SCx200 is not set

#
# Executable file formats / Emulations
#
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_AOUT is not set
CONFIG_BINFMT_MISC=y

#
# Networking
#
# CONFIG_NET is not set

#
# Device Drivers
#

#
# Generic Driver Options
#
# CONFIG_STANDALONE is not set
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
# CONFIG_DEBUG_DRIVER is not set
CONFIG_DEBUG_DEVRES=y
# CONFIG_SYS_HYPERVISOR is not set
# CONFIG_MTD is not set
CONFIG_PARPORT=y
CONFIG_PARPORT_PC=y
# CONFIG_PARPORT_SERIAL is not set
# CONFIG_PARPORT_PC_FIFO is not set
CONFIG_PARPORT_PC_SUPERIO=y
# CONFIG_PARPORT_GSC is not set
# CONFIG_PARPORT_AX88796 is not set
# CONFIG_PARPORT_1284 is not set
CONFIG_MISC_DEVICES=y
CONFIG_IBM_ASM=y
CONFIG_PHANTOM=y
CONFIG_EEPROM_93CX6=y
CONFIG_SGI_IOC4=y
CONFIG_TIFM_CORE=y
# CONFIG_TIFM_7XX1 is not set

#
# SCSI device support
#
# CONFIG_SCSI_DMA is not set
# CONFIG_SCSI_NETLINK is not set
# CONFIG_FUSION is not set

#
# IEEE 1394 (FireWire) support
#
# CONFIG_FIREWIRE is not set
# CONFIG_IEEE1394 is not set
CONFIG_I2O=y
CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y
# CONFIG_I2O_EXT_ADAPTEC is not set
CONFIG_I2O_CONFIG=y
CONFIG_I2O_CONFIG_OLD_IOCTL=y
# CONFIG_I2O_BUS is not set
# CONFIG_I2O_PROC is not set
# CONFIG_MACINTOSH_DRIVERS is not set
CONFIG_PHONE=y
CONFIG_PHONE_IXJ=y

#
# Input device support
#
CONFIG_INPUT=y
# CONFIG_INPUT_FF_MEMLESS is not set
CONFIG_INPUT_POLLDEV=y

#
# Userland interfaces
#
# CONFIG_INPUT_MOUSEDEV is not set
# CONFIG_INPUT_JOYDEV is not set
CONFIG_INPUT_EVDEV=y
# CONFIG_INPUT_EVBUG is not set

#
# Input Device Drivers
#
# CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set
CONFIG_INPUT_JOYSTICK=y
# CONFIG_JOYSTICK_ANALOG is not set
# CONFIG_JOYSTICK_A3D is not set
CONFIG_JOYSTICK_ADI=y
# CONFIG_JOYSTICK_COBRA is not set
# CONFIG_JOYSTICK_GF2K is not set
# CONFIG_JOYSTICK_GRIP is not set
CONFIG_JOYSTICK_GRIP_MP=y
CONFIG_JOYSTICK_GUILLEMOT=y
CONFIG_JOYSTICK_INTERACT=y
# CONFIG_JOYSTICK_SIDEWINDER is not set
# CONFIG_JOYSTICK_TMDC is not set
# CONFIG_JOYSTICK_IFORCE is not set
CONFIG_JOYSTICK_WARRIOR=y
# CONFIG_JOYSTICK_MAGELLAN is not set
CONFIG_JOYSTICK_SPACEORB=y
CONFIG_JOYSTICK_SPACEBALL=y
# CONFIG_JOYSTICK_STINGER is not set
# CONFIG_JOYSTICK_TWIDJOY is not set
# CONFIG_JOYSTICK_DB9 is not set
# CONFIG_JOYSTICK_GAMECON is not set
# CONFIG_JOYSTICK_TURBOGRAFX is not set
# CONFIG_JOYSTICK_JOYDUMP is not set
CONFIG_INPUT_TABLET=y
CONFIG_INPUT_TOUCHSCREEN=y
# CONFIG_TOUCHSCREEN_FUJITSU is not set
CONFIG_TOUCHSCREEN_GUNZE=y
# CONFIG_TOUCHSCREEN_ELO is not set
# CONFIG_TOUCHSCREEN_MTOUCH is not set
# CONFIG_TOUCHSCREEN_MK712 is not set
# CONFIG_TOUCHSCREEN_PENMOUNT is not set
CONFIG_TOUCHSCREEN_TOUCHRIGHT=y
CONFIG_TOUCHSCREEN_TOUCHWIN=y
# CONFIG_TOUCHSCREEN_UCB1400 is not set
# CONFIG_INPUT_MISC is not set

#
# Hardware I/O ports
#
CONFIG_SERIO=y
# CONFIG_SERIO_I8042 is not set
CONFIG_SERIO_SERPORT=y
CONFIG_SERIO_CT82C710=y
# CONFIG_SERIO_PARKBD is not set
# CONFIG_SERIO_PCIPS2 is not set
CONFIG_SERIO_LIBPS2=y
CONFIG_SERIO_RAW=y
CONFIG_GAMEPORT=y
CONFIG_GAMEPORT_NS558=y
# CONFIG_GAMEPORT_L4 is not set
# CONFIG_GAMEPORT_EMU10K1 is not set
CONFIG_GAMEPORT_FM801=y

#
# Character devices
#
CONFIG_VT=y
# CONFIG_VT_CONSOLE is not set
CONFIG_HW_CONSOLE=y
CONFIG_VT_HW_CONSOLE_BINDING=y
CONFIG_SERIAL_NONSTANDARD=y
# CONFIG_COMPUTONE is not set
# CONFIG_ROCKETPORT is not set
CONFIG_CYCLADES=y
# CONFIG_CYZ_INTR is not set
# CONFIG_DIGIEPCA is not set
# CONFIG_MOXA_INTELLIO is not set
# CONFIG_MOXA_SMARTIO is not set
# CONFIG_MOXA_SMARTIO_NEW is not set
# CONFIG_ISI is not set
CONFIG_SYNCLINK=y
# CONFIG_SYNCLINKMP is not set
# CONFIG_SYNCLINK_GT is not set
CONFIG_N_HDLC=y
# CONFIG_RISCOM8 is not set
# CONFIG_SPECIALIX is not set
CONFIG_SX=y
CONFIG_RIO=y
# CONFIG_RIO_OLDPCI is not set
CONFIG_STALDRV=y
CONFIG_STALLION=y
# CONFIG_ISTALLION is not set
# CONFIG_NOZOMI is not set

#
# Serial drivers
#
CONFIG_SERIAL_8250=y
# CONFIG_SERIAL_8250_CONSOLE is not set
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set

#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
# CONFIG_SERIAL_JSM is not set
CONFIG_UNIX98_PTYS=y
# CONFIG_LEGACY_PTYS is not set
CONFIG_PRINTER=y
# CONFIG_LP_CONSOLE is not set
CONFIG_PPDEV=y
# CONFIG_IPMI_HANDLER is not set
# CONFIG_HW_RANDOM is not set
CONFIG_NVRAM=y
# CONFIG_RTC is not set
# CONFIG_GEN_RTC is not set
CONFIG_R3964=y
CONFIG_APPLICOM=y
# CONFIG_SONYPI is not set
# CONFIG_MWAVE is not set
# CONFIG_PC8736x_GPIO is not set
# CONFIG_NSC_GPIO is not set
# CONFIG_CS5535_GPIO is not set
CONFIG_HANGCHECK_TIMER=y
CONFIG_TCG_TPM=y
# CONFIG_TCG_ATMEL is not set
CONFIG_TELCLOCK=y
CONFIG_DEVPORT=y
CONFIG_I2C=y
CONFIG_I2C_BOARDINFO=y
# CONFIG_I2C_CHARDEV is not set

#
# I2C Algorithms
#
CONFIG_I2C_ALGOBIT=y
CONFIG_I2C_ALGOPCF=y
CONFIG_I2C_ALGOPCA=y

#
# I2C Hardware Bus support
#
# CONFIG_I2C_ALI1535 is not set
CONFIG_I2C_ALI1563=y
CONFIG_I2C_ALI15X3=y
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
# CONFIG_I2C_I801 is not set
# CONFIG_I2C_I810 is not set
CONFIG_I2C_PIIX4=y
# CONFIG_I2C_NFORCE2 is not set
# CONFIG_I2C_OCORES is not set
# CONFIG_I2C_PARPORT is not set
CONFIG_I2C_PARPORT_LIGHT=y
# CONFIG_I2C_PROSAVAGE is not set
# CONFIG_I2C_SAVAGE4 is not set
CONFIG_I2C_SIMTEC=y
# CONFIG_SCx200_ACB is not set
# CONFIG_I2C_SIS5595 is not set
CONFIG_I2C_SIS630=y
CONFIG_I2C_SIS96X=y
CONFIG_I2C_TAOS_EVM=y
CONFIG_I2C_VIA=y
# CONFIG_I2C_VIAPRO is not set
CONFIG_I2C_VOODOO3=y

#
# Miscellaneous I2C Chip support
#
# CONFIG_SENSORS_DS1337 is not set
# CONFIG_SENSORS_DS1374 is not set
# CONFIG_DS1682 is not set
# CONFIG_SENSORS_EEPROM is not set
CONFIG_SENSORS_PCF8574=y
CONFIG_SENSORS_PCA9539=y
# CONFIG_SENSORS_PCF8591 is not set
CONFIG_SENSORS_MAX6875=y
CONFIG_SENSORS_TSL2550=y
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
CONFIG_I2C_DEBUG_CHIP=y

#
# SPI support
#
# CONFIG_SPI is not set
# CONFIG_SPI_MASTER is not set
CONFIG_W1=y

#
# 1-wire Bus Masters
#
CONFIG_W1_MASTER_MATROX=y
CONFIG_W1_MASTER_DS2482=y

#
# 1-wire Slaves
#
# CONFIG_W1_SLAVE_THERM is not set
# CONFIG_W1_SLAVE_SMEM is not set
CONFIG_W1_SLAVE_DS2433=y
CONFIG_W1_SLAVE_DS2433_CRC=y
CONFIG_W1_SLAVE_DS2760=y
CONFIG_POWER_SUPPLY=y
CONFIG_POWER_SUPPLY_DEBUG=y
CONFIG_PDA_POWER=y
CONFIG_BATTERY_DS2760=y
CONFIG_HWMON=y
CONFIG_HWMON_VID=y
# CONFIG_SENSORS_ABITUGURU is not set
CONFIG_SENSORS_ABITUGURU3=y
# CONFIG_SENSORS_AD7418 is not set
# CONFIG_SENSORS_ADM1021 is not set
CONFIG_SENSORS_ADM1025=y
# CONFIG_SENSORS_ADM1026 is not set
CONFIG_SENSORS_ADM1029=y
CONFIG_SENSORS_ADM1031=y
CONFIG_SENSORS_ADM9240=y
CONFIG_SENSORS_ADT7470=y
# CONFIG_SENSORS_K8TEMP is not set
# CONFIG_SENSORS_ASB100 is not set
# CONFIG_SENSORS_ATXP1 is not set
CONFIG_SENSORS_DS1621=y
CONFIG_SENSORS_I5K_AMB=y
CONFIG_SENSORS_F71805F=y
CONFIG_SENSORS_F71882FG=y
# CONFIG_SENSORS_F75375S is not set
# CONFIG_SENSORS_FSCHER is not set
# CONFIG_SENSORS_FSCPOS is not set
CONFIG_SENSORS_FSCHMD=y
CONFIG_SENSORS_GL518SM=y
CONFIG_SENSORS_GL520SM=y
# CONFIG_SENSORS_CORETEMP is not set
CONFIG_SENSORS_IT87=y
CONFIG_SENSORS_LM63=y
CONFIG_SENSORS_LM75=y
CONFIG_SENSORS_LM77=y
# CONFIG_SENSORS_LM78 is not set
CONFIG_SENSORS_LM80=y
CONFIG_SENSORS_LM83=y
CONFIG_SENSORS_LM85=y
# CONFIG_SENSORS_LM87 is not set
# CONFIG_SENSORS_LM90 is not set
CONFIG_SENSORS_LM92=y
CONFIG_SENSORS_LM93=y
# CONFIG_SENSORS_MAX1619 is not set
# CONFIG_SENSORS_MAX6650 is not set
CONFIG_SENSORS_PC87360=y
# CONFIG_SENSORS_PC87427 is not set
CONFIG_SENSORS_SIS5595=y
CONFIG_SENSORS_DME1737=y
CONFIG_SENSORS_SMSC47M1=y
CONFIG_SENSORS_SMSC47M192=y
CONFIG_SENSORS_SMSC47B397=y
CONFIG_SENSORS_THMC50=y
CONFIG_SENSORS_VIA686A=y
# CONFIG_SENSORS_VT1211 is not set
# CONFIG_SENSORS_VT8231 is not set
# CONFIG_SENSORS_W83781D is not set
CONFIG_SENSORS_W83791D=y
# CONFIG_SENSORS_W83792D is not set
CONFIG_SENSORS_W83793=y
# CONFIG_SENSORS_W83L785TS is not set
# CONFIG_SENSORS_W83627HF is not set
# CONFIG_SENSORS_W83627EHF is not set
# CONFIG_SENSORS_HDAPS is not set
CONFIG_SENSORS_APPLESMC=y
# CONFIG_HWMON_DEBUG_CHIP is not set
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_NOWAYOUT=y

#
# Watchdog Device Drivers
#
# CONFIG_SOFT_WATCHDOG is not set
CONFIG_ACQUIRE_WDT=y
# CONFIG_ADVANTECH_WDT is not set
CONFIG_ALIM1535_WDT=y
CONFIG_ALIM7101_WDT=y
# CONFIG_SC520_WDT is not set
CONFIG_EUROTECH_WDT=y
# CONFIG_IB700_WDT is not set
CONFIG_IBMASR=y
CONFIG_WAFER_WDT=y
CONFIG_I6300ESB_WDT=y
# CONFIG_ITCO_WDT is not set
# CONFIG_IT8712F_WDT is not set
# CONFIG_SC1200_WDT is not set
# CONFIG_PC87413_WDT is not set
CONFIG_60XX_WDT=y
CONFIG_SBC8360_WDT=y
# CONFIG_SBC7240_WDT is not set
CONFIG_CPU5_WDT=y
CONFIG_SMSC37B787_WDT=y
# CONFIG_W83627HF_WDT is not set
# CONFIG_W83697HF_WDT is not set
CONFIG_W83877F_WDT=y
CONFIG_W83977F_WDT=y
# CONFIG_MACHZ_WDT is not set
CONFIG_SBC_EPX_C3_WATCHDOG=y

#
# PCI-based Watchdog Cards
#
# CONFIG_PCIPCWATCHDOG is not set
CONFIG_WDTPCI=y
# CONFIG_WDT_501_PCI is not set

#
# Sonics Silicon Backplane
#
CONFIG_SSB_POSSIBLE=y
# CONFIG_SSB is not set

#
# Multifunction device drivers
#
# CONFIG_MFD_SM501 is not set

#
# Multimedia devices
#
CONFIG_VIDEO_DEV=y
# CONFIG_VIDEO_V4L1 is not set
# CONFIG_VIDEO_V4L1_COMPAT is not set
CONFIG_VIDEO_V4L2=y
# CONFIG_VIDEO_CAPTURE_DRIVERS is not set
CONFIG_RADIO_ADAPTERS=y
CONFIG_RADIO_GEMTEK_PCI=y
# CONFIG_RADIO_MAXIRADIO is not set
# CONFIG_RADIO_MAESTRO is not set
CONFIG_DAB=y

#
# Graphics support
#
# CONFIG_AGP is not set
CONFIG_DRM=y
# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_R128 is not set
# CONFIG_DRM_RADEON is not set
# CONFIG_DRM_MGA is not set
CONFIG_DRM_VIA=y
CONFIG_DRM_SAVAGE=y
CONFIG_VGASTATE=y
CONFIG_VIDEO_OUTPUT_CONTROL=y
CONFIG_FB=y
# CONFIG_FIRMWARE_EDID is not set
CONFIG_FB_DDC=y
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y
# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
CONFIG_FB_SYS_FILLRECT=y
CONFIG_FB_SYS_COPYAREA=y
CONFIG_FB_SYS_IMAGEBLIT=y
CONFIG_FB_SYS_FOPS=y
CONFIG_FB_DEFERRED_IO=y
CONFIG_FB_SVGALIB=y
# CONFIG_FB_MACMODES is not set
CONFIG_FB_BACKLIGHT=y
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_TILEBLITTING=y

#
# Frame buffer hardware drivers
#
CONFIG_FB_CIRRUS=y
CONFIG_FB_PM2=y
# CONFIG_FB_PM2_FIFO_DISCONNECT is not set
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_ARC is not set
CONFIG_FB_ASILIANT=y
CONFIG_FB_IMSTT=y
CONFIG_FB_VGA16=y
CONFIG_FB_VESA=y
# CONFIG_FB_EFI is not set
# CONFIG_FB_HECUBA is not set
CONFIG_FB_HGA=y
CONFIG_FB_HGA_ACCEL=y
CONFIG_FB_S1D13XXX=y
CONFIG_FB_NVIDIA=y
# CONFIG_FB_NVIDIA_I2C is not set
CONFIG_FB_NVIDIA_DEBUG=y
CONFIG_FB_NVIDIA_BACKLIGHT=y
CONFIG_FB_RIVA=y
CONFIG_FB_RIVA_I2C=y
CONFIG_FB_RIVA_DEBUG=y
CONFIG_FB_RIVA_BACKLIGHT=y
# CONFIG_FB_I810 is not set
# CONFIG_FB_LE80578 is not set
# CONFIG_FB_INTEL is not set
CONFIG_FB_MATROX=y
CONFIG_FB_MATROX_MILLENIUM=y
CONFIG_FB_MATROX_MYSTIQUE=y
CONFIG_FB_MATROX_G=y
# CONFIG_FB_MATROX_I2C is not set
CONFIG_FB_MATROX_MULTIHEAD=y
CONFIG_FB_RADEON=y
# CONFIG_FB_RADEON_I2C is not set
# CONFIG_FB_RADEON_BACKLIGHT is not set
CONFIG_FB_RADEON_DEBUG=y
CONFIG_FB_ATY128=y
CONFIG_FB_ATY128_BACKLIGHT=y
CONFIG_FB_ATY=y
CONFIG_FB_ATY_CT=y
CONFIG_FB_ATY_GENERIC_LCD=y
# CONFIG_FB_ATY_GX is not set
CONFIG_FB_ATY_BACKLIGHT=y
# CONFIG_FB_S3 is not set
CONFIG_FB_SAVAGE=y
# CONFIG_FB_SAVAGE_I2C is not set
# CONFIG_FB_SAVAGE_ACCEL is not set
# CONFIG_FB_SIS is not set
CONFIG_FB_NEOMAGIC=y
CONFIG_FB_KYRO=y
# CONFIG_FB_3DFX is not set
CONFIG_FB_VOODOO1=y
CONFIG_FB_VT8623=y
# CONFIG_FB_CYBLA is not set
# CONFIG_FB_TRIDENT is not set
CONFIG_FB_ARK=y
# CONFIG_FB_PM3 is not set
# CONFIG_FB_GEODE is not set
# CONFIG_FB_VIRTUAL is not set
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_LCD_CLASS_DEVICE=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_BACKLIGHT_CORGI is not set
CONFIG_BACKLIGHT_PROGEAR=y

#
# Display device support
#
CONFIG_DISPLAY_SUPPORT=y

#
# Display hardware drivers
#

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
# CONFIG_VGACON_SOFT_SCROLLBACK is not set
CONFIG_VIDEO_SELECT=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
# CONFIG_LOGO_LINUX_CLUT224 is not set

#
# Sound
#
CONFIG_SOUND=y

#
# Advanced Linux Sound Architecture
#
CONFIG_SND=y
CONFIG_SND_TIMER=y
CONFIG_SND_PCM=y
CONFIG_SND_HWDEP=y
CONFIG_SND_RAWMIDI=y
CONFIG_SND_SEQUENCER=y
# CONFIG_SND_SEQ_DUMMY is not set
# CONFIG_SND_MIXER_OSS is not set
# CONFIG_SND_PCM_OSS is not set
# CONFIG_SND_SEQUENCER_OSS is not set
# CONFIG_SND_DYNAMIC_MINORS is not set
# CONFIG_SND_SUPPORT_OLD_API is not set
CONFIG_SND_VERBOSE_PROCFS=y
# CONFIG_SND_VERBOSE_PRINTK is not set
CONFIG_SND_DEBUG=y
# CONFIG_SND_DEBUG_DETECT is not set
# CONFIG_SND_PCM_XRUN_DEBUG is not set

#
# Generic devices
#
CONFIG_SND_MPU401_UART=y
CONFIG_SND_OPL3_LIB=y
CONFIG_SND_AC97_CODEC=y
CONFIG_SND_DUMMY=y
CONFIG_SND_VIRMIDI=y
# CONFIG_SND_MTPAV is not set
# CONFIG_SND_MTS64 is not set
# CONFIG_SND_SERIAL_U16550 is not set
CONFIG_SND_MPU401=y
CONFIG_SND_PORTMAN2X4=y
CONFIG_SND_SB_COMMON=y
CONFIG_SND_SB16_DSP=y

#
# PCI devices
#
# CONFIG_SND_AD1889 is not set
CONFIG_SND_ALS300=y
# CONFIG_SND_ALS4000 is not set
CONFIG_SND_ALI5451=y
# CONFIG_SND_ATIIXP is not set
# CONFIG_SND_ATIIXP_MODEM is not set
CONFIG_SND_AU8810=y
CONFIG_SND_AU8820=y
CONFIG_SND_AU8830=y
# CONFIG_SND_AZT3328 is not set
# CONFIG_SND_BT87X is not set
# CONFIG_SND_CA0106 is not set
CONFIG_SND_CMIPCI=y
# CONFIG_SND_CS4281 is not set
# CONFIG_SND_CS46XX is not set
CONFIG_SND_CS5530=y
# CONFIG_SND_CS5535AUDIO is not set
CONFIG_SND_DARLA20=y
CONFIG_SND_GINA20=y
# CONFIG_SND_LAYLA20 is not set
# CONFIG_SND_DARLA24 is not set
CONFIG_SND_GINA24=y
CONFIG_SND_LAYLA24=y
CONFIG_SND_MONA=y
# CONFIG_SND_MIA is not set
CONFIG_SND_ECHO3G=y
# CONFIG_SND_INDIGO is not set
# CONFIG_SND_INDIGOIO is not set
# CONFIG_SND_INDIGODJ is not set
CONFIG_SND_EMU10K1=y
CONFIG_SND_EMU10K1X=y
# CONFIG_SND_ENS1370 is not set
# CONFIG_SND_ENS1371 is not set
CONFIG_SND_ES1938=y
CONFIG_SND_ES1968=y
# CONFIG_SND_FM801 is not set
CONFIG_SND_HDA_INTEL=y
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_CODEC_REALTEK=y
CONFIG_SND_HDA_CODEC_ANALOG=y
# CONFIG_SND_HDA_CODEC_SIGMATEL is not set
# CONFIG_SND_HDA_CODEC_VIA is not set
# CONFIG_SND_HDA_CODEC_ATIHDMI is not set
# CONFIG_SND_HDA_CODEC_CONEXANT is not set
# CONFIG_SND_HDA_CODEC_CMEDIA is not set
CONFIG_SND_HDA_CODEC_SI3054=y
CONFIG_SND_HDA_GENERIC=y
# CONFIG_SND_HDA_POWER_SAVE is not set
CONFIG_SND_HDSP=y
# CONFIG_SND_HDSPM is not set
# CONFIG_SND_ICE1712 is not set
CONFIG_SND_ICE1724=y
# CONFIG_SND_INTEL8X0 is not set
CONFIG_SND_INTEL8X0M=y
CONFIG_SND_KORG1212=y
# CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL is not set
# CONFIG_SND_MAESTRO3 is not set
CONFIG_SND_MIXART=y
CONFIG_SND_NM256=y
CONFIG_SND_PCXHR=y
CONFIG_SND_RIPTIDE=y
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
CONFIG_SND_RME9652=y
CONFIG_SND_SONICVIBES=y
# CONFIG_SND_TRIDENT is not set
# CONFIG_SND_VIA82XX is not set
CONFIG_SND_VIA82XX_MODEM=y
# CONFIG_SND_VX222 is not set
# CONFIG_SND_YMFPCI is not set
# CONFIG_SND_AC97_POWER_SAVE is not set

#
# System on Chip audio support
#
# CONFIG_SND_SOC is not set

#
# SoC Audio support for SuperH
#

#
# Open Sound System
#
CONFIG_SOUND_PRIME=y
# CONFIG_SOUND_TRIDENT is not set
CONFIG_SOUND_MSNDCLAS=y

#
# Compiled-in MSND Classic support requires firmware during compilation.
#
CONFIG_MSNDCLAS_HAVE_BOOT=y
CONFIG_MSNDCLAS_INIT_FILE="/etc/sound/msndinit.bin"
CONFIG_MSNDCLAS_PERM_FILE="/etc/sound/msndperm.bin"
CONFIG_MSNDCLAS_IRQ=5
CONFIG_MSNDCLAS_MEM=0xD0000
CONFIG_MSNDCLAS_IO=0x290
# CONFIG_SOUND_MSNDPIN is not set
CONFIG_MSND_FIFOSIZE=128
# CONFIG_SOUND_OSS is not set
CONFIG_AC97_BUS=y
# CONFIG_HID_SUPPORT is not set
# CONFIG_USB_SUPPORT is not set
# CONFIG_MMC is not set
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y

#
# LED drivers
#

#
# LED Triggers
#
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_TIMER=y
# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
# CONFIG_INFINIBAND is not set
CONFIG_EDAC=y

#
# Reporting subsystems
#
CONFIG_EDAC_DEBUG=y
CONFIG_EDAC_MM_EDAC=y
# CONFIG_EDAC_AMD76X is not set
# CONFIG_EDAC_E7XXX is not set
# CONFIG_EDAC_I82875P is not set
CONFIG_EDAC_I82975X=y
# CONFIG_EDAC_I3000 is not set
# CONFIG_EDAC_I82860 is not set
# CONFIG_EDAC_R82600 is not set
CONFIG_EDAC_I5000=y
# CONFIG_RTC_CLASS is not set
# CONFIG_DMADEVICES is not set
CONFIG_AUXDISPLAY=y
CONFIG_KS0108=y
CONFIG_KS0108_PORT=0x378
CONFIG_KS0108_DELAY=2
CONFIG_CFAG12864B=y
CONFIG_CFAG12864B_RATE=20
CONFIG_VIRTUALIZATION=y
CONFIG_KVM=y
# CONFIG_KVM_INTEL is not set
CONFIG_KVM_AMD=y

#
# Userspace I/O
#
CONFIG_UIO=y
CONFIG_UIO_CIF=y

#
# Firmware Drivers
#
CONFIG_EDD=y
# CONFIG_DELL_RBU is not set
CONFIG_DCDBAS=y
# CONFIG_DMIID is not set

#
# File systems
#
# CONFIG_INOTIFY is not set
# CONFIG_QUOTA is not set
# CONFIG_DNOTIFY is not set
CONFIG_AUTOFS_FS=y
# CONFIG_AUTOFS4_FS is not set
CONFIG_FUSE_FS=y

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
# CONFIG_PROC_KCORE is not set
# CONFIG_PROC_SYSCTL is not set
CONFIG_SYSFS=y
CONFIG_TMPFS=y
# CONFIG_TMPFS_POSIX_ACL is not set
# CONFIG_HUGETLBFS is not set
# CONFIG_HUGETLB_PAGE is not set
# CONFIG_CONFIGFS_FS is not set

#
# Miscellaneous filesystems
#
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_CODEPAGE_737=y
CONFIG_NLS_CODEPAGE_775=y
CONFIG_NLS_CODEPAGE_850=y
# CONFIG_NLS_CODEPAGE_852 is not set
CONFIG_NLS_CODEPAGE_855=y
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
CONFIG_NLS_CODEPAGE_861=y
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
CONFIG_NLS_CODEPAGE_864=y
# CONFIG_NLS_CODEPAGE_865 is not set
CONFIG_NLS_CODEPAGE_866=y
# CONFIG_NLS_CODEPAGE_869 is not set
CONFIG_NLS_CODEPAGE_936=y
# CONFIG_NLS_CODEPAGE_950 is not set
CONFIG_NLS_CODEPAGE_932=y
# CONFIG_NLS_CODEPAGE_949 is not set
CONFIG_NLS_CODEPAGE_874=y
# CONFIG_NLS_ISO8859_8 is not set
CONFIG_NLS_CODEPAGE_1250=y
CONFIG_NLS_CODEPAGE_1251=y
CONFIG_NLS_ASCII=y
CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_ISO8859_2=y
CONFIG_NLS_ISO8859_3=y
CONFIG_NLS_ISO8859_4=y
CONFIG_NLS_ISO8859_5=y
CONFIG_NLS_ISO8859_6=y
# CONFIG_NLS_ISO8859_7 is not set
CONFIG_NLS_ISO8859_9=y
CONFIG_NLS_ISO8859_13=y
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
CONFIG_NLS_KOI8_R=y
# CONFIG_NLS_KOI8_U is not set
CONFIG_NLS_UTF8=y
# CONFIG_INSTRUMENTATION is not set

#
# Kernel hacking
#
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_PRINTK_TIME=y
# CONFIG_ENABLE_WARN_DEPRECATED is not set
# CONFIG_ENABLE_MUST_CHECK is not set
CONFIG_MAGIC_SYSRQ=y
CONFIG_UNUSED_SYMBOLS=y
CONFIG_DEBUG_FS=y
# CONFIG_HEADERS_CHECK is not set
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_SHIRQ=y
# CONFIG_DETECT_SOFTLOCKUP is not set
# CONFIG_SCHED_DEBUG is not set
# CONFIG_SCHEDSTATS is not set
# CONFIG_TIMER_STATS is not set
CONFIG_DEBUG_SLAB=y
CONFIG_DEBUG_SLAB_LEAK=y
CONFIG_DEBUG_SPINLOCK=y
CONFIG_DEBUG_MUTEXES=y
CONFIG_DEBUG_LOCK_ALLOC=y
# CONFIG_PROVE_LOCKING is not set
CONFIG_LOCKDEP=y
# CONFIG_LOCK_STAT is not set
CONFIG_DEBUG_LOCKDEP=y
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
CONFIG_STACKTRACE=y
# CONFIG_DEBUG_KOBJECT is not set
# CONFIG_DEBUG_HIGHMEM is not set
CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_VM is not set
CONFIG_DEBUG_LIST=y
CONFIG_DEBUG_SG=y
CONFIG_FRAME_POINTER=y
CONFIG_FORCED_INLINING=y
# CONFIG_BOOT_PRINTK_DELAY is not set
# CONFIG_FAULT_INJECTION is not set
# CONFIG_LATENCYTOP is not set
CONFIG_SAMPLES=y
# CONFIG_SAMPLE_KOBJECT is not set
# CONFIG_EARLY_PRINTK is not set
CONFIG_DEBUG_STACKOVERFLOW=y
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_DEBUG_PAGEALLOC is not set
# CONFIG_DEBUG_RODATA is not set
# CONFIG_4KSTACKS is not set
CONFIG_DOUBLEFAULT=y

#
# Security options
#
# CONFIG_KEYS is not set
# CONFIG_SECURITY is not set
CONFIG_SECURITY_FILE_CAPABILITIES=y
CONFIG_CRYPTO=y
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_AEAD=y
CONFIG_CRYPTO_BLKCIPHER=y
CONFIG_CRYPTO_SEQIV=y
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_MANAGER=y
# CONFIG_CRYPTO_HMAC is not set
CONFIG_CRYPTO_XCBC=y
CONFIG_CRYPTO_NULL=y
CONFIG_CRYPTO_MD4=y
CONFIG_CRYPTO_MD5=y
# CONFIG_CRYPTO_SHA1 is not set
CONFIG_CRYPTO_SHA256=y
# CONFIG_CRYPTO_SHA512 is not set
CONFIG_CRYPTO_WP512=y
# CONFIG_CRYPTO_TGR192 is not set
CONFIG_CRYPTO_GF128MUL=y
# CONFIG_CRYPTO_ECB is not set
# CONFIG_CRYPTO_CBC is not set
CONFIG_CRYPTO_PCBC=y
# CONFIG_CRYPTO_LRW is not set
CONFIG_CRYPTO_XTS=y
CONFIG_CRYPTO_CTR=y
# CONFIG_CRYPTO_GCM is not set
CONFIG_CRYPTO_CCM=y
# CONFIG_CRYPTO_CRYPTD is not set
CONFIG_CRYPTO_DES=y
# CONFIG_CRYPTO_FCRYPT is not set
CONFIG_CRYPTO_BLOWFISH=y
# CONFIG_CRYPTO_TWOFISH is not set
# CONFIG_CRYPTO_TWOFISH_586 is not set
CONFIG_CRYPTO_SERPENT=y
# CONFIG_CRYPTO_AES is not set
# CONFIG_CRYPTO_AES_586 is not set
CONFIG_CRYPTO_CAST5=y
CONFIG_CRYPTO_CAST6=y
CONFIG_CRYPTO_TEA=y
CONFIG_CRYPTO_ARC4=y
CONFIG_CRYPTO_KHAZAD=y
# CONFIG_CRYPTO_ANUBIS is not set
# CONFIG_CRYPTO_SEED is not set
CONFIG_CRYPTO_SALSA20=y
# CONFIG_CRYPTO_SALSA20_586 is not set
CONFIG_CRYPTO_DEFLATE=y
# CONFIG_CRYPTO_MICHAEL_MIC is not set
# CONFIG_CRYPTO_CRC32C is not set
CONFIG_CRYPTO_CAMELLIA=y
CONFIG_CRYPTO_AUTHENC=y
# CONFIG_CRYPTO_LZO is not set
CONFIG_CRYPTO_HW=y
# CONFIG_CRYPTO_DEV_PADLOCK is not set
# CONFIG_CRYPTO_DEV_GEODE is not set
CONFIG_CRYPTO_DEV_HIFN_795X=y

#
# Library routines
#
CONFIG_BITREVERSE=y
# CONFIG_CRC_CCITT is not set
CONFIG_CRC16=y
# CONFIG_CRC_ITU_T is not set
CONFIG_CRC32=y
CONFIG_CRC7=y
# CONFIG_LIBCRC32C is not set
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y

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

* Re: [Patch] Shut up warnings from files under drivers/
  2008-01-26 10:18   ` WANG Cong
@ 2008-01-26 11:44     ` Jeff Garzik
  0 siblings, 0 replies; 22+ messages in thread
From: Jeff Garzik @ 2008-01-26 11:44 UTC (permalink / raw)
  To: WANG Cong; +Cc: Greg KH, LKML, Andrew Morton

WANG Cong wrote:
> For example, the defination of __devexit_p:
> 
> #if defined(MODULE) || defined(CONFIG_HOTPLUG)
> #define __devexit_p(x) x
> #else
> #define __devexit_p(x) NULL
> #endif
> 
> If !(defined(MODULE) || defined(CONFIG_HOTPLUG)), __devexit_p
> is just a NULL pointer, thus 'x' may be unused although defined.


  ...and that's the purpose of the __devexit marker on the code itself.

	Jeff



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

* Re: [Patch] Shut up warnings from files under drivers/
  2008-01-26  9:55 ` Jeff Garzik
  2008-01-26 10:18   ` WANG Cong
@ 2008-01-26 19:17   ` Sam Ravnborg
  2008-01-26 19:30     ` Sam Ravnborg
                       ` (2 more replies)
  1 sibling, 3 replies; 22+ messages in thread
From: Sam Ravnborg @ 2008-01-26 19:17 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: WANG Cong, Greg KH, LKML, Andrew Morton

On Sat, Jan 26, 2008 at 04:55:58AM -0500, Jeff Garzik wrote:
> WANG Cong wrote:
> >diff --git a/drivers/video/kyro/fbdev.c b/drivers/video/kyro/fbdev.c
> >index acb9370..437ebd0 100644
> >--- a/drivers/video/kyro/fbdev.c
> >+++ b/drivers/video/kyro/fbdev.c
> >@@ -90,7 +90,9 @@ static int nomtrr __devinitdata = 0;
> > 
> > /* PCI driver prototypes */
> > static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id 
> > *ent);
> >+#if defined(MODULE) || defined(CONFIG_HOTPLUG)
> > static void kyrofb_remove(struct pci_dev *pdev);
> >+#endif
> > 
> > static struct fb_videomode kyro_modedb[] __devinitdata = {
> > 	{
> >@@ -754,6 +756,7 @@ out_unmap:
> > 	return -EINVAL;
> > }
> > 
> >+#if defined(MODULE) || defined(CONFIG_HOTPLUG)
> > static void __devexit kyrofb_remove(struct pci_dev *pdev)
> > {
> > 	struct fb_info *info = pci_get_drvdata(pdev);
> >@@ -783,6 +786,7 @@ static void __devexit kyrofb_remove(struct pci_dev 
> >*pdev)
> > 	pci_set_drvdata(pdev, NULL);
> > 	framebuffer_release(info);
> > }
> >+#endif
> 
> 
> Quite strange -- due to __devexit_p() and the __devexit marker, ifdefs 
> should not be needed.
> 
> I would look into why that isn't working as designed in these cases...

I checked up on the synclink.c warning.
We have the following code:

static void synclink_remove_one (struct pci_dev *dev);

...

static struct pci_driver synclink_pci_driver = {
        .remove         = __devexit_p(synclink_remove_one),
};

...

static void __devexit synclink_remove_one (struct pci_dev *dev)
{
}

And I double checked the preprocessed source to check
that we applied the __attribute__((__used__)) to the function.

Investigating a bit more I realized that gcc looses the
__used__ attribution due to the prototype.
So there are two correct fixes:
a) move the function up so we do not need the forward
   declaration
b) add a __devexit to the forward decalration too.

I strongly prefer the first version and this is the
correct fix for these cases.

Do we have a gcc bug here - I did not see a definitive answer in gcc docs?

	Sam

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

* Re: [Patch] Shut up warnings from files under drivers/
  2008-01-26 19:17   ` Sam Ravnborg
@ 2008-01-26 19:30     ` Sam Ravnborg
  2008-01-27  2:50     ` WANG Cong
  2008-01-27  4:15     ` (Updated) " WANG Cong
  2 siblings, 0 replies; 22+ messages in thread
From: Sam Ravnborg @ 2008-01-26 19:30 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: WANG Cong, Greg KH, LKML, Andrew Morton

> I checked up on the synclink.c warning.
> We have the following code:
> 
> static void synclink_remove_one (struct pci_dev *dev);
> 
> ...
> 
> static struct pci_driver synclink_pci_driver = {
>         .remove         = __devexit_p(synclink_remove_one),
> };
> 
> ...
> 
> static void __devexit synclink_remove_one (struct pci_dev *dev)
> {
> }
> 
> And I double checked the preprocessed source to check
> that we applied the __attribute__((__used__)) to the function.
> 
> Investigating a bit more I realized that gcc looses the
> __used__ attribution due to the prototype.
> So there are two correct fixes:
> a) move the function up so we do not need the forward
>    declaration
> b) add a __devexit to the forward decalration too.
> 
> I strongly prefer the first version and this is the
> correct fix for these cases.
> 
> Do we have a gcc bug here - I did not see a definitive answer in gcc docs?

I have reported it now - follow:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34985

	Sam

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

* Re: [Patch] Shut up warnings from files under drivers/
  2008-01-26 19:17   ` Sam Ravnborg
  2008-01-26 19:30     ` Sam Ravnborg
@ 2008-01-27  2:50     ` WANG Cong
  2008-01-27  4:15     ` (Updated) " WANG Cong
  2 siblings, 0 replies; 22+ messages in thread
From: WANG Cong @ 2008-01-27  2:50 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Jeff Garzik, WANG Cong, Greg KH, LKML, Andrew Morton

On Sat, Jan 26, 2008 at 08:17:17PM +0100, Sam Ravnborg wrote:
>On Sat, Jan 26, 2008 at 04:55:58AM -0500, Jeff Garzik wrote:
>> WANG Cong wrote:
>> >diff --git a/drivers/video/kyro/fbdev.c b/drivers/video/kyro/fbdev.c
>> >index acb9370..437ebd0 100644
>> >--- a/drivers/video/kyro/fbdev.c
>> >+++ b/drivers/video/kyro/fbdev.c
>> >@@ -90,7 +90,9 @@ static int nomtrr __devinitdata = 0;
>> > 
>> > /* PCI driver prototypes */
>> > static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id 
>> > *ent);
>> >+#if defined(MODULE) || defined(CONFIG_HOTPLUG)
>> > static void kyrofb_remove(struct pci_dev *pdev);
>> >+#endif
>> > 
>> > static struct fb_videomode kyro_modedb[] __devinitdata = {
>> > 	{
>> >@@ -754,6 +756,7 @@ out_unmap:
>> > 	return -EINVAL;
>> > }
>> > 
>> >+#if defined(MODULE) || defined(CONFIG_HOTPLUG)
>> > static void __devexit kyrofb_remove(struct pci_dev *pdev)
>> > {
>> > 	struct fb_info *info = pci_get_drvdata(pdev);
>> >@@ -783,6 +786,7 @@ static void __devexit kyrofb_remove(struct pci_dev 
>> >*pdev)
>> > 	pci_set_drvdata(pdev, NULL);
>> > 	framebuffer_release(info);
>> > }
>> >+#endif
>> 
>> 
>> Quite strange -- due to __devexit_p() and the __devexit marker, ifdefs 
>> should not be needed.
>> 
>> I would look into why that isn't working as designed in these cases...
>
>I checked up on the synclink.c warning.
>We have the following code:
>
>static void synclink_remove_one (struct pci_dev *dev);
>
>...
>
>static struct pci_driver synclink_pci_driver = {
>        .remove         = __devexit_p(synclink_remove_one),
>};
>
>...
>
>static void __devexit synclink_remove_one (struct pci_dev *dev)
>{
>}
>
>And I double checked the preprocessed source to check
>that we applied the __attribute__((__used__)) to the function.

Yes. The only macro we used on synclink_remove_one is __devexit.
It's defination is:

#ifdef CONFIG_HOTPLUG
#define __devexit
#else
#define __devexit __exit
#endif

And __exit is:
#ifdef MODULE
#define __exit          __attribute__ ((__section__(".exit.text"))) __cold
#else
#define __exit          __attribute_used__ __attribute__ ((__section__(".exit.text"))) __cold
#endif

So only when !defined(MODULE) && !defined(CONFIG_HOTPLUG),
__attribute_used__ is applied. And this case is just that
condition, thus this should be a bogus of gcc.


>
>Investigating a bit more I realized that gcc looses the
>__used__ attribution due to the prototype.
>So there are two correct fixes:
>a) move the function up so we do not need the forward
>   declaration
>b) add a __devexit to the forward decalration too.
>
>I strongly prefer the first version and this is the
>correct fix for these cases.
>
>Do we have a gcc bug here - I did not see a definitive answer in gcc docs?
>

Agreed. I will try a).



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

* (Updated) [Patch] Shut up warnings from files under drivers/
  2008-01-26 19:17   ` Sam Ravnborg
  2008-01-26 19:30     ` Sam Ravnborg
  2008-01-27  2:50     ` WANG Cong
@ 2008-01-27  4:15     ` WANG Cong
  2008-01-27  9:08       ` Jiri Slaby
  2008-01-27  9:21       ` Sam Ravnborg
  2 siblings, 2 replies; 22+ messages in thread
From: WANG Cong @ 2008-01-27  4:15 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Jeff Garzik, WANG Cong, Greg KH, LKML, Andrew Morton


>Investigating a bit more I realized that gcc looses the
>__used__ attribution due to the prototype.
>So there are two correct fixes:
>a) move the function up so we do not need the forward
>   declaration
>b) add a __devexit to the forward decalration too.
>
>I strongly prefer the first version and this is the
>correct fix for these cases.
>
>Do we have a gcc bug here - I did not see a definitive answer in gcc docs?
>

Here is the updated version.

---->

Fix defined-but-not-used warnings from files under drivers/,
such as:

drivers/char/applicom.c:68: warning: ‘applicom_pci_tbl’ defined but not used

Compile tests passed.

Cc: Jeff Garzik <jeff@garzik.org>
Cc: Greg KH <gregkh@suse.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>

---

diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c
index 1f0b752..97171ad 100644
--- a/drivers/char/applicom.c
+++ b/drivers/char/applicom.c
@@ -65,7 +65,7 @@ static char *applicom_pci_devnames[] = {
 	"PCI2000PFB"
 };
 
-static struct pci_device_id applicom_pci_tbl[] = {
+static struct pci_device_id applicom_pci_tbl[] __used = {
 	{ PCI_VENDOR_ID_APPLICOM, PCI_DEVICE_ID_APPLICOM_PCIGENERIC,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	{ PCI_VENDOR_ID_APPLICOM, PCI_DEVICE_ID_APPLICOM_PCI2000IBS_CAN,
diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c
index 905d1f5..ae1f565 100644
--- a/drivers/char/synclink.c
+++ b/drivers/char/synclink.c
@@ -897,7 +897,6 @@ static char *driver_version = "$Revision: 4.38 $";
 
 static int synclink_init_one (struct pci_dev *dev,
 				     const struct pci_device_id *ent);
-static void synclink_remove_one (struct pci_dev *dev);
 
 static struct pci_device_id synclink_pci_tbl[] = {
 	{ PCI_VENDOR_ID_MICROGATE, PCI_DEVICE_ID_MICROGATE_USC, PCI_ANY_ID, PCI_ANY_ID, },
@@ -908,6 +907,10 @@ MODULE_DEVICE_TABLE(pci, synclink_pci_tbl);
 
 MODULE_LICENSE("GPL");
 
+static void __devexit synclink_remove_one (struct pci_dev *dev)
+{
+}
+
 static struct pci_driver synclink_pci_driver = {
 	.name		= "synclink",
 	.id_table	= synclink_pci_tbl,
@@ -8166,7 +8169,3 @@ static int __devinit synclink_init_one (struct pci_dev *dev,
 	return 0;
 }
 
-static void __devexit synclink_remove_one (struct pci_dev *dev)
-{
-}
-
diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c
index dfbf24c..f33f82a 100644
--- a/drivers/crypto/hifn_795x.c
+++ b/drivers/crypto/hifn_795x.c
@@ -2730,7 +2730,7 @@ err_out_disable_pci_device:
 	return err;
 }
 
-static void hifn_remove(struct pci_dev *pdev)
+static void __devexit hifn_remove(struct pci_dev *pdev)
 {
 	int i;
 	struct hifn_device *dev;
diff --git a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c
index 49cd979..1549c0b 100644
--- a/drivers/telephony/ixj.c
+++ b/drivers/telephony/ixj.c
@@ -284,7 +284,7 @@ static int samplerate = 100;
 
 module_param(ixjdebug, int, 0);
 
-static struct pci_device_id ixj_pci_tbl[] __devinitdata = {
+static struct pci_device_id ixj_pci_tbl[] __used __devinitdata = {
 	{ PCI_VENDOR_ID_QUICKNET, PCI_DEVICE_ID_QUICKNET_XJ,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
 	{ }
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
index cbd3308..4e57fcf 100644
--- a/drivers/video/aty/aty128fb.c
+++ b/drivers/video/aty/aty128fb.c
@@ -165,7 +165,7 @@ static const char *r128_family[] __devinitdata = {
  */
 static int aty128_probe(struct pci_dev *pdev,
                                const struct pci_device_id *ent);
-static void aty128_remove(struct pci_dev *pdev);
+static void __devexit aty128_remove(struct pci_dev *pdev);
 static int aty128_pci_suspend(struct pci_dev *pdev, pm_message_t state);
 static int aty128_pci_resume(struct pci_dev *pdev);
 static int aty128_do_resume(struct pci_dev *pdev);
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index d775eb6..eec1624 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -244,7 +244,9 @@ static int atyfb_sync(struct fb_info *info);
      */
 
 static int aty_init(struct fb_info *info);
+#if defined(CONFIG_PM) && defined(CONFIG_PCI)
 static void aty_resume_chip(struct fb_info *info);
+#endif
 #ifdef CONFIG_ATARI
 static int store_video_par(char *videopar, unsigned char m64_num);
 #endif
@@ -2709,6 +2711,7 @@ aty_init_exit:
 	return -1;
 }
 
+#if defined(CONFIG_PM) && defined(CONFIG_PCI)
 static void aty_resume_chip(struct fb_info *info)
 {
 	struct atyfb_par *par = info->par;
@@ -2721,6 +2724,7 @@ static void aty_resume_chip(struct fb_info *info)
 	if (par->aux_start)
 		aty_st_le32(BUS_CNTL, aty_ld_le32(BUS_CNTL, par) | BUS_APER_REG_DIS, par);
 }
+#endif
 
 #ifdef CONFIG_ATARI
 static int __devinit store_video_par(char *video_str, unsigned char m64_num)
diff --git a/drivers/video/imsttfb.c b/drivers/video/imsttfb.c
index 3ab91bf..cdedd72 100644
--- a/drivers/video/imsttfb.c
+++ b/drivers/video/imsttfb.c
@@ -400,7 +400,6 @@ static struct imstt_regvals tvp_reg_init_20 = {
  * PCI driver prototypes
  */
 static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
-static void imsttfb_remove(struct pci_dev *pdev);
 
 /*
  * Register access
@@ -1328,6 +1327,21 @@ static struct pci_device_id imsttfb_pci_tbl[] = {
 
 MODULE_DEVICE_TABLE(pci, imsttfb_pci_tbl);
 
+static void __devexit
+imsttfb_remove(struct pci_dev *pdev)
+{
+	struct fb_info *info = pci_get_drvdata(pdev);
+	struct imstt_par *par = info->par;
+	int size = pci_resource_len(pdev, 0);
+
+	unregister_framebuffer(info);
+	iounmap(par->cmap_regs);
+	iounmap(par->dc_regs);
+	iounmap(info->screen_base);
+	release_mem_region(info->fix.smem_start, size);
+	framebuffer_release(info);
+}
+
 static struct pci_driver imsttfb_pci_driver = {
 	.name =		"imsttfb",
 	.id_table =	imsttfb_pci_tbl,
@@ -1533,21 +1547,6 @@ imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	return 0;
 }
 
-static void __devexit
-imsttfb_remove(struct pci_dev *pdev)
-{
-	struct fb_info *info = pci_get_drvdata(pdev);
-	struct imstt_par *par = info->par;
-	int size = pci_resource_len(pdev, 0);
-
-	unregister_framebuffer(info);
-	iounmap(par->cmap_regs);
-	iounmap(par->dc_regs);
-	iounmap(info->screen_base);
-	release_mem_region(info->fix.smem_start, size);
-	framebuffer_release(info);
-}
-
 #ifndef MODULE
 static int __init
 imsttfb_setup(char *options)
diff --git a/drivers/video/kyro/fbdev.c b/drivers/video/kyro/fbdev.c
index acb9370..6e49c7a 100644
--- a/drivers/video/kyro/fbdev.c
+++ b/drivers/video/kyro/fbdev.c
@@ -90,7 +90,6 @@ static int nomtrr __devinitdata = 0;
 
 /* PCI driver prototypes */
 static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
-static void kyrofb_remove(struct pci_dev *pdev);
 
 static struct fb_videomode kyro_modedb[] __devinitdata = {
 	{
@@ -649,6 +648,36 @@ static struct pci_device_id kyrofb_pci_tbl[] = {
 
 MODULE_DEVICE_TABLE(pci, kyrofb_pci_tbl);
 
+static void __devexit kyrofb_remove(struct pci_dev *pdev)
+{
+	struct fb_info *info = pci_get_drvdata(pdev);
+	struct kyrofb_info *par = info->par;
+
+	/* Reset the board */
+	StopVTG(deviceInfo.pSTGReg);
+	DisableRamdacOutput(deviceInfo.pSTGReg);
+
+	/* Sync up the PLL */
+	SetCoreClockPLL(deviceInfo.pSTGReg, pdev);
+
+	deviceInfo.ulNextFreeVidMem = 0;
+	deviceInfo.ulOverlayOffset = 0;
+
+	iounmap(info->screen_base);
+	iounmap(par->regbase);
+
+#ifdef CONFIG_MTRR
+	if (par->mtrr_handle)
+		mtrr_del(par->mtrr_handle,
+			 info->fix.smem_start,
+			 info->fix.smem_len);
+#endif
+
+	unregister_framebuffer(info);
+	pci_set_drvdata(pdev, NULL);
+	framebuffer_release(info);
+}
+
 static struct pci_driver kyrofb_pci_driver = {
 	.name		= "kyrofb",
 	.id_table	= kyrofb_pci_tbl,
@@ -754,36 +783,6 @@ out_unmap:
 	return -EINVAL;
 }
 
-static void __devexit kyrofb_remove(struct pci_dev *pdev)
-{
-	struct fb_info *info = pci_get_drvdata(pdev);
-	struct kyrofb_info *par = info->par;
-
-	/* Reset the board */
-	StopVTG(deviceInfo.pSTGReg);
-	DisableRamdacOutput(deviceInfo.pSTGReg);
-
-	/* Sync up the PLL */
-	SetCoreClockPLL(deviceInfo.pSTGReg, pdev);
-
-	deviceInfo.ulNextFreeVidMem = 0;
-	deviceInfo.ulOverlayOffset = 0;
-
-	iounmap(info->screen_base);
-	iounmap(par->regbase);
-
-#ifdef CONFIG_MTRR
-	if (par->mtrr_handle)
-		mtrr_del(par->mtrr_handle,
-			 info->fix.smem_start,
-			 info->fix.smem_len);
-#endif
-
-	unregister_framebuffer(info);
-	pci_set_drvdata(pdev, NULL);
-	framebuffer_release(info);
-}
-
 static int __init kyrofb_init(void)
 {
 #ifndef MODULE
diff --git a/drivers/watchdog/alim1535_wdt.c b/drivers/watchdog/alim1535_wdt.c
index b481cc0..fd2dfa1 100644
--- a/drivers/watchdog/alim1535_wdt.c
+++ b/drivers/watchdog/alim1535_wdt.c
@@ -311,7 +311,7 @@ static int ali_notify_sys(struct notifier_block *this, unsigned long code, void
  *	want to register another driver on the same PCI id.
  */
 
-static struct pci_device_id ali_pci_tbl[] = {
+static struct pci_device_id ali_pci_tbl[] __used = {
 	{ PCI_VENDOR_ID_AL, 0x1533, PCI_ANY_ID, PCI_ANY_ID,},
 	{ PCI_VENDOR_ID_AL, 0x1535, PCI_ANY_ID, PCI_ANY_ID,},
 	{ 0, },
diff --git a/drivers/watchdog/alim7101_wdt.c b/drivers/watchdog/alim7101_wdt.c
index 67aed9f..4bcae99 100644
--- a/drivers/watchdog/alim7101_wdt.c
+++ b/drivers/watchdog/alim7101_wdt.c
@@ -409,7 +409,7 @@ err_out:
 module_init(alim7101_wdt_init);
 module_exit(alim7101_wdt_unload);
 
-static struct pci_device_id alim7101_pci_tbl[] __devinitdata = {
+static struct pci_device_id alim7101_pci_tbl[] __used __devinitdata = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101) },
 	{ }

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

* Re: (Updated) [Patch] Shut up warnings from files under drivers/
  2008-01-27  4:15     ` (Updated) " WANG Cong
@ 2008-01-27  9:08       ` Jiri Slaby
  2008-01-27  9:21         ` Jiri Slaby
  2008-01-27  9:21       ` Sam Ravnborg
  1 sibling, 1 reply; 22+ messages in thread
From: Jiri Slaby @ 2008-01-27  9:08 UTC (permalink / raw)
  To: WANG Cong; +Cc: Sam Ravnborg, Jeff Garzik, Greg KH, LKML, Andrew Morton

On 01/27/2008 05:15 AM, WANG Cong wrote:
> Fix defined-but-not-used warnings from files under drivers/,
> such as:
> 
> drivers/char/applicom.c:68: warning: ‘applicom_pci_tbl’ defined but not used
> 
> Compile tests passed.
> 
> Cc: Jeff Garzik <jeff@garzik.org>
> Cc: Greg KH <gregkh@suse.de>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
> 
> ---
> 
> diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c
> index 1f0b752..97171ad 100644
> --- a/drivers/char/applicom.c
> +++ b/drivers/char/applicom.c
> @@ -65,7 +65,7 @@ static char *applicom_pci_devnames[] = {
>  	"PCI2000PFB"
>  };
>  
> -static struct pci_device_id applicom_pci_tbl[] = {
> +static struct pci_device_id applicom_pci_tbl[] __used = {
>  	{ PCI_VENDOR_ID_APPLICOM, PCI_DEVICE_ID_APPLICOM_PCIGENERIC,
>  	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
>  	{ PCI_VENDOR_ID_APPLICOM, PCI_DEVICE_ID_APPLICOM_PCI2000IBS_CAN,

I have probably a better fix with pci_match_id() referencing this array.

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

* Re: (Updated) [Patch] Shut up warnings from files under drivers/
  2008-01-27  4:15     ` (Updated) " WANG Cong
  2008-01-27  9:08       ` Jiri Slaby
@ 2008-01-27  9:21       ` Sam Ravnborg
  2008-01-28  5:49         ` (Try#3) " WANG Cong
  1 sibling, 1 reply; 22+ messages in thread
From: Sam Ravnborg @ 2008-01-27  9:21 UTC (permalink / raw)
  To: WANG Cong; +Cc: Jeff Garzik, Greg KH, LKML, Andrew Morton

Hi WANG.

Thanks for chasing these annoying warnings - it is
good to keep the warning level low so we keep
attention when new warnings happens!

> index d775eb6..eec1624 100644
> --- a/drivers/video/aty/atyfb_base.c
> +++ b/drivers/video/aty/atyfb_base.c
> @@ -244,7 +244,9 @@ static int atyfb_sync(struct fb_info *info);
>       */
>  
>  static int aty_init(struct fb_info *info);
> +#if defined(CONFIG_PM) && defined(CONFIG_PCI)
>  static void aty_resume_chip(struct fb_info *info);
> +#endif

It is preferable to have the forward declaration unconditional
to keep the #if/#endif count low.


>  #endif
> @@ -2709,6 +2711,7 @@ aty_init_exit:
>  	return -1;
>  }
>  
> +#if defined(CONFIG_PM) && defined(CONFIG_PCI)
>  static void aty_resume_chip(struct fb_info *info)
>  {
>  	struct atyfb_par *par = info->par;
> @@ -2721,6 +2724,7 @@ static void aty_resume_chip(struct fb_info *info)
>  	if (par->aux_start)
>  		aty_st_le32(BUS_CNTL, aty_ld_le32(BUS_CNTL, par) | BUS_APER_REG_DIS, par);
>  }
> +#endif

Moving the aty_resume_chip() function down just above
atyfb_pci_resume() would put in in the same #if/#endif
block and you can kill the forward declaration too.
Did you try that out?

I could not spot any obvious reason why it should not work,
but I did not try it out.

	Sam

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

* Re: (Updated) [Patch] Shut up warnings from files under drivers/
  2008-01-27  9:08       ` Jiri Slaby
@ 2008-01-27  9:21         ` Jiri Slaby
  2008-01-28  5:20           ` WANG Cong
  0 siblings, 1 reply; 22+ messages in thread
From: Jiri Slaby @ 2008-01-27  9:21 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: WANG Cong, Sam Ravnborg, Jeff Garzik, Greg KH, LKML,
	Andrew Morton, David Woodhouse

On 01/27/2008 10:08 AM, Jiri Slaby wrote:
> On 01/27/2008 05:15 AM, WANG Cong wrote:
>> Fix defined-but-not-used warnings from files under drivers/,
>> such as:
>>
>> drivers/char/applicom.c:68: warning: ‘applicom_pci_tbl’ defined but 
>> not used
>>
>> Compile tests passed.
>>
>> Cc: Jeff Garzik <jeff@garzik.org>
>> Cc: Greg KH <gregkh@suse.de>
>> Cc: Sam Ravnborg <sam@ravnborg.org>
>> Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
>>
>> ---
>>
>> diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c
>> index 1f0b752..97171ad 100644
>> --- a/drivers/char/applicom.c
>> +++ b/drivers/char/applicom.c
>> @@ -65,7 +65,7 @@ static char *applicom_pci_devnames[] = {
>>      "PCI2000PFB"
>>  };
>>  
>> -static struct pci_device_id applicom_pci_tbl[] = {
>> +static struct pci_device_id applicom_pci_tbl[] __used = {
>>      { PCI_VENDOR_ID_APPLICOM, PCI_DEVICE_ID_APPLICOM_PCIGENERIC,
>>        PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
>>      { PCI_VENDOR_ID_APPLICOM, PCI_DEVICE_ID_APPLICOM_PCI2000IBS_CAN,
> 
> I have probably a better fix with pci_match_id() referencing this array.

Hmm, checking it one more time persuades me that the best fix ever is to convert 
it to probing. David, do you have the card?

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

* Re: (Updated) [Patch] Shut up warnings from files under drivers/
  2008-01-27  9:21         ` Jiri Slaby
@ 2008-01-28  5:20           ` WANG Cong
  0 siblings, 0 replies; 22+ messages in thread
From: WANG Cong @ 2008-01-28  5:20 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: WANG Cong, Sam Ravnborg, Jeff Garzik, Greg KH, LKML,
	Andrew Morton, David Woodhouse

On Sun, Jan 27, 2008 at 10:21:12AM +0100, Jiri Slaby wrote:
>On 01/27/2008 10:08 AM, Jiri Slaby wrote:
>>On 01/27/2008 05:15 AM, WANG Cong wrote:
>>>Fix defined-but-not-used warnings from files under drivers/,
>>>such as:
>>>
>>>drivers/char/applicom.c:68: warning: ‘applicom_pci_tbl’ defined but 
>>>not used
>>>
>>>Compile tests passed.
>>>
>>>Cc: Jeff Garzik <jeff@garzik.org>
>>>Cc: Greg KH <gregkh@suse.de>
>>>Cc: Sam Ravnborg <sam@ravnborg.org>
>>>Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
>>>
>>>---
>>>
>>>diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c
>>>index 1f0b752..97171ad 100644
>>>--- a/drivers/char/applicom.c
>>>+++ b/drivers/char/applicom.c
>>>@@ -65,7 +65,7 @@ static char *applicom_pci_devnames[] = {
>>>     "PCI2000PFB"
>>> };
>>> 
>>>-static struct pci_device_id applicom_pci_tbl[] = {
>>>+static struct pci_device_id applicom_pci_tbl[] __used = {
>>>     { PCI_VENDOR_ID_APPLICOM, PCI_DEVICE_ID_APPLICOM_PCIGENERIC,
>>>       PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
>>>     { PCI_VENDOR_ID_APPLICOM, PCI_DEVICE_ID_APPLICOM_PCI2000IBS_CAN,
>>
>>I have probably a better fix with pci_match_id() referencing this array.
>
>Hmm, checking it one more time persuades me that the best fix ever is to 
>convert it to probing. David, do you have the card?

OK. I will drop this part.


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

* (Try#3) [Patch] Shut up warnings from files under drivers/
  2008-01-27  9:21       ` Sam Ravnborg
@ 2008-01-28  5:49         ` WANG Cong
       [not found]           ` <1201691351-1038?= =?ISO-8859-1?Q?4-1-git-send-ema?= =?ISO-8859-1?Q?il-=1B[D>
                             ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: WANG Cong @ 2008-01-28  5:49 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: WANG Cong, Jeff Garzik, Greg KH, LKML, Andrew Morton

On Sun, Jan 27, 2008 at 10:21:00AM +0100, Sam Ravnborg wrote:
>Hi WANG.
>
>Thanks for chasing these annoying warnings - it is
>good to keep the warning level low so we keep
>attention when new warnings happens!
>
>> index d775eb6..eec1624 100644
>> --- a/drivers/video/aty/atyfb_base.c
>> +++ b/drivers/video/aty/atyfb_base.c
>> @@ -244,7 +244,9 @@ static int atyfb_sync(struct fb_info *info);
>>       */
>>  
>>  static int aty_init(struct fb_info *info);
>> +#if defined(CONFIG_PM) && defined(CONFIG_PCI)
>>  static void aty_resume_chip(struct fb_info *info);
>> +#endif
>
>It is preferable to have the forward declaration unconditional
>to keep the #if/#endif count low.
>
>
>>  #endif
>> @@ -2709,6 +2711,7 @@ aty_init_exit:
>>  	return -1;
>>  }
>>  
>> +#if defined(CONFIG_PM) && defined(CONFIG_PCI)
>>  static void aty_resume_chip(struct fb_info *info)
>>  {
>>  	struct atyfb_par *par = info->par;
>> @@ -2721,6 +2724,7 @@ static void aty_resume_chip(struct fb_info *info)
>>  	if (par->aux_start)
>>  		aty_st_le32(BUS_CNTL, aty_ld_le32(BUS_CNTL, par) | BUS_APER_REG_DIS, par);
>>  }
>> +#endif
>
>Moving the aty_resume_chip() function down just above
>atyfb_pci_resume() would put in in the same #if/#endif
>block and you can kill the forward declaration too.
>Did you try that out?

Yes, it works.

Here's the updated patch, and I dropped the drivers/char/applicom.c
part as Jiri Slaby has better fix.

------->

Fix defined-but-not-used warnings from files under drivers/,
such as:

drivers/video/aty/atyfb_base.c:2713: warning: ‘aty_resume_chip’ defined but not used

Compile tests passed.

Cc: Jeff Garzik <jeff@garzik.org>
Cc: Greg KH <gregkh@suse.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>

---

diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c
index 905d1f5..ae1f565 100644
--- a/drivers/char/synclink.c
+++ b/drivers/char/synclink.c
@@ -897,7 +897,6 @@ static char *driver_version = "$Revision: 4.38 $";
 
 static int synclink_init_one (struct pci_dev *dev,
 				     const struct pci_device_id *ent);
-static void synclink_remove_one (struct pci_dev *dev);
 
 static struct pci_device_id synclink_pci_tbl[] = {
 	{ PCI_VENDOR_ID_MICROGATE, PCI_DEVICE_ID_MICROGATE_USC, PCI_ANY_ID, PCI_ANY_ID, },
@@ -908,6 +907,10 @@ MODULE_DEVICE_TABLE(pci, synclink_pci_tbl);
 
 MODULE_LICENSE("GPL");
 
+static void __devexit synclink_remove_one (struct pci_dev *dev)
+{
+}
+
 static struct pci_driver synclink_pci_driver = {
 	.name		= "synclink",
 	.id_table	= synclink_pci_tbl,
@@ -8166,7 +8169,3 @@ static int __devinit synclink_init_one (struct pci_dev *dev,
 	return 0;
 }
 
-static void __devexit synclink_remove_one (struct pci_dev *dev)
-{
-}
-
diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c
index dfbf24c..f33f82a 100644
--- a/drivers/crypto/hifn_795x.c
+++ b/drivers/crypto/hifn_795x.c
@@ -2730,7 +2730,7 @@ err_out_disable_pci_device:
 	return err;
 }
 
-static void hifn_remove(struct pci_dev *pdev)
+static void __devexit hifn_remove(struct pci_dev *pdev)
 {
 	int i;
 	struct hifn_device *dev;
diff --git a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c
index 49cd979..1549c0b 100644
--- a/drivers/telephony/ixj.c
+++ b/drivers/telephony/ixj.c
@@ -284,7 +284,7 @@ static int samplerate = 100;
 
 module_param(ixjdebug, int, 0);
 
-static struct pci_device_id ixj_pci_tbl[] __devinitdata = {
+static struct pci_device_id ixj_pci_tbl[] __used __devinitdata = {
 	{ PCI_VENDOR_ID_QUICKNET, PCI_DEVICE_ID_QUICKNET_XJ,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
 	{ }
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
index cbd3308..4e57fcf 100644
--- a/drivers/video/aty/aty128fb.c
+++ b/drivers/video/aty/aty128fb.c
@@ -165,7 +165,7 @@ static const char *r128_family[] __devinitdata = {
  */
 static int aty128_probe(struct pci_dev *pdev,
                                const struct pci_device_id *ent);
-static void aty128_remove(struct pci_dev *pdev);
+static void __devexit aty128_remove(struct pci_dev *pdev);
 static int aty128_pci_suspend(struct pci_dev *pdev, pm_message_t state);
 static int aty128_pci_resume(struct pci_dev *pdev);
 static int aty128_do_resume(struct pci_dev *pdev);
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index d775eb6..3829f3e 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -244,7 +244,6 @@ static int atyfb_sync(struct fb_info *info);
      */
 
 static int aty_init(struct fb_info *info);
-static void aty_resume_chip(struct fb_info *info);
 #ifdef CONFIG_ATARI
 static int store_video_par(char *videopar, unsigned char m64_num);
 #endif
@@ -2076,6 +2075,20 @@ static int atyfb_pci_suspend(struct pci_dev *pdev, pm_message_t state)
 	return 0;
 }
 
+static void aty_resume_chip(struct fb_info *info)
+{
+	struct atyfb_par *par = info->par;
+
+	aty_st_le32(MEM_CNTL, par->mem_cntl, par);
+
+	if (par->pll_ops->resume_pll)
+		par->pll_ops->resume_pll(info, &par->pll);
+
+	if (par->aux_start)
+		aty_st_le32(BUS_CNTL, aty_ld_le32(BUS_CNTL, par) | BUS_APER_REG_DIS, par);
+}
+
+
 static int atyfb_pci_resume(struct pci_dev *pdev)
 {
 	struct fb_info *info = pci_get_drvdata(pdev);
@@ -2709,19 +2722,6 @@ aty_init_exit:
 	return -1;
 }
 
-static void aty_resume_chip(struct fb_info *info)
-{
-	struct atyfb_par *par = info->par;
-
-	aty_st_le32(MEM_CNTL, par->mem_cntl, par);
-
-	if (par->pll_ops->resume_pll)
-		par->pll_ops->resume_pll(info, &par->pll);
-
-	if (par->aux_start)
-		aty_st_le32(BUS_CNTL, aty_ld_le32(BUS_CNTL, par) | BUS_APER_REG_DIS, par);
-}
-
 #ifdef CONFIG_ATARI
 static int __devinit store_video_par(char *video_str, unsigned char m64_num)
 {
diff --git a/drivers/video/imsttfb.c b/drivers/video/imsttfb.c
index 3ab91bf..cdedd72 100644
--- a/drivers/video/imsttfb.c
+++ b/drivers/video/imsttfb.c
@@ -400,7 +400,6 @@ static struct imstt_regvals tvp_reg_init_20 = {
  * PCI driver prototypes
  */
 static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
-static void imsttfb_remove(struct pci_dev *pdev);
 
 /*
  * Register access
@@ -1328,6 +1327,21 @@ static struct pci_device_id imsttfb_pci_tbl[] = {
 
 MODULE_DEVICE_TABLE(pci, imsttfb_pci_tbl);
 
+static void __devexit
+imsttfb_remove(struct pci_dev *pdev)
+{
+	struct fb_info *info = pci_get_drvdata(pdev);
+	struct imstt_par *par = info->par;
+	int size = pci_resource_len(pdev, 0);
+
+	unregister_framebuffer(info);
+	iounmap(par->cmap_regs);
+	iounmap(par->dc_regs);
+	iounmap(info->screen_base);
+	release_mem_region(info->fix.smem_start, size);
+	framebuffer_release(info);
+}
+
 static struct pci_driver imsttfb_pci_driver = {
 	.name =		"imsttfb",
 	.id_table =	imsttfb_pci_tbl,
@@ -1533,21 +1547,6 @@ imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	return 0;
 }
 
-static void __devexit
-imsttfb_remove(struct pci_dev *pdev)
-{
-	struct fb_info *info = pci_get_drvdata(pdev);
-	struct imstt_par *par = info->par;
-	int size = pci_resource_len(pdev, 0);
-
-	unregister_framebuffer(info);
-	iounmap(par->cmap_regs);
-	iounmap(par->dc_regs);
-	iounmap(info->screen_base);
-	release_mem_region(info->fix.smem_start, size);
-	framebuffer_release(info);
-}
-
 #ifndef MODULE
 static int __init
 imsttfb_setup(char *options)
diff --git a/drivers/video/kyro/fbdev.c b/drivers/video/kyro/fbdev.c
index acb9370..6e49c7a 100644
--- a/drivers/video/kyro/fbdev.c
+++ b/drivers/video/kyro/fbdev.c
@@ -90,7 +90,6 @@ static int nomtrr __devinitdata = 0;
 
 /* PCI driver prototypes */
 static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
-static void kyrofb_remove(struct pci_dev *pdev);
 
 static struct fb_videomode kyro_modedb[] __devinitdata = {
 	{
@@ -649,6 +648,36 @@ static struct pci_device_id kyrofb_pci_tbl[] = {
 
 MODULE_DEVICE_TABLE(pci, kyrofb_pci_tbl);
 
+static void __devexit kyrofb_remove(struct pci_dev *pdev)
+{
+	struct fb_info *info = pci_get_drvdata(pdev);
+	struct kyrofb_info *par = info->par;
+
+	/* Reset the board */
+	StopVTG(deviceInfo.pSTGReg);
+	DisableRamdacOutput(deviceInfo.pSTGReg);
+
+	/* Sync up the PLL */
+	SetCoreClockPLL(deviceInfo.pSTGReg, pdev);
+
+	deviceInfo.ulNextFreeVidMem = 0;
+	deviceInfo.ulOverlayOffset = 0;
+
+	iounmap(info->screen_base);
+	iounmap(par->regbase);
+
+#ifdef CONFIG_MTRR
+	if (par->mtrr_handle)
+		mtrr_del(par->mtrr_handle,
+			 info->fix.smem_start,
+			 info->fix.smem_len);
+#endif
+
+	unregister_framebuffer(info);
+	pci_set_drvdata(pdev, NULL);
+	framebuffer_release(info);
+}
+
 static struct pci_driver kyrofb_pci_driver = {
 	.name		= "kyrofb",
 	.id_table	= kyrofb_pci_tbl,
@@ -754,36 +783,6 @@ out_unmap:
 	return -EINVAL;
 }
 
-static void __devexit kyrofb_remove(struct pci_dev *pdev)
-{
-	struct fb_info *info = pci_get_drvdata(pdev);
-	struct kyrofb_info *par = info->par;
-
-	/* Reset the board */
-	StopVTG(deviceInfo.pSTGReg);
-	DisableRamdacOutput(deviceInfo.pSTGReg);
-
-	/* Sync up the PLL */
-	SetCoreClockPLL(deviceInfo.pSTGReg, pdev);
-
-	deviceInfo.ulNextFreeVidMem = 0;
-	deviceInfo.ulOverlayOffset = 0;
-
-	iounmap(info->screen_base);
-	iounmap(par->regbase);
-
-#ifdef CONFIG_MTRR
-	if (par->mtrr_handle)
-		mtrr_del(par->mtrr_handle,
-			 info->fix.smem_start,
-			 info->fix.smem_len);
-#endif
-
-	unregister_framebuffer(info);
-	pci_set_drvdata(pdev, NULL);
-	framebuffer_release(info);
-}
-
 static int __init kyrofb_init(void)
 {
 #ifndef MODULE
diff --git a/drivers/watchdog/alim1535_wdt.c b/drivers/watchdog/alim1535_wdt.c
index b481cc0..fd2dfa1 100644
--- a/drivers/watchdog/alim1535_wdt.c
+++ b/drivers/watchdog/alim1535_wdt.c
@@ -311,7 +311,7 @@ static int ali_notify_sys(struct notifier_block *this, unsigned long code, void
  *	want to register another driver on the same PCI id.
  */
 
-static struct pci_device_id ali_pci_tbl[] = {
+static struct pci_device_id ali_pci_tbl[] __used = {
 	{ PCI_VENDOR_ID_AL, 0x1533, PCI_ANY_ID, PCI_ANY_ID,},
 	{ PCI_VENDOR_ID_AL, 0x1535, PCI_ANY_ID, PCI_ANY_ID,},
 	{ 0, },
diff --git a/drivers/watchdog/alim7101_wdt.c b/drivers/watchdog/alim7101_wdt.c
index 67aed9f..4bcae99 100644
--- a/drivers/watchdog/alim7101_wdt.c
+++ b/drivers/watchdog/alim7101_wdt.c
@@ -409,7 +409,7 @@ err_out:
 module_init(alim7101_wdt_init);
 module_exit(alim7101_wdt_unload);
 
-static struct pci_device_id alim7101_pci_tbl[] __devinitdata = {
+static struct pci_device_id alim7101_pci_tbl[] __used __devinitdata = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101) },
 	{ }

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

* Re: [PATCH 1/2] Char: applicom, use pci_resource_start
       [not found]           ` <1201691351-1038?= =?ISO-8859-1?Q?4-1-git-send-ema?= =?ISO-8859-1?Q?il-=1B[D>
@ 2008-01-30 11:10             ` Jiri Slaby
  0 siblings, 0 replies; 22+ messages in thread
From: Jiri Slaby @ 2008-01-30 11:10 UTC (permalink / raw)
  Cc: Andrew Morton, linux-kernel, dwmw2

On 01/30/2008 12:09 PM, ^[[D wrote:

Eh, Jiri, don't touch left arrow while it's asking for From: person :P.

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

* [PATCH 1/2] Char: applicom, use pci_resource_start
  2008-01-28  5:49         ` (Try#3) " WANG Cong
       [not found]           ` <1201691351-1038?= =?ISO-8859-1?Q?4-1-git-send-ema?= =?ISO-8859-1?Q?il-=1B[D>
@ 2008-01-30 11:13           ` Jiri Slaby
  2008-01-30 11:13           ` [PATCH 2/2] Char: applicom, use pci_match_id Jiri Slaby
  2 siblings, 0 replies; 22+ messages in thread
From: Jiri Slaby @ 2008-01-30 11:13 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, dwmw2, Jiri Slaby

Use pci_resource_start instead of accessing pci_dev struct internals.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
 drivers/char/applicom.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c
index 1f0b752..b0bb71b 100644
--- a/drivers/char/applicom.c
+++ b/drivers/char/applicom.c
@@ -206,22 +206,23 @@ static int __init applicom_init(void)
 		if (pci_enable_device(dev))
 			return -EIO;
 
-		RamIO = ioremap(dev->resource[0].start, LEN_RAM_IO);
+		RamIO = ioremap(pci_resource_start(dev, 0), LEN_RAM_IO);
 
 		if (!RamIO) {
 			printk(KERN_INFO "ac.o: Failed to ioremap PCI memory "
 				"space at 0x%llx\n",
-				(unsigned long long)dev->resource[0].start);
+				(unsigned long long)pci_resource_start(dev, 0));
 			pci_disable_device(dev);
 			return -EIO;
 		}
 
 		printk(KERN_INFO "Applicom %s found at mem 0x%llx, irq %d\n",
 		       applicom_pci_devnames[dev->device-1],
-			   (unsigned long long)dev->resource[0].start,
+			   (unsigned long long)pci_resource_start(dev, 0),
 		       dev->irq);
 
-		boardno = ac_register_board(dev->resource[0].start, RamIO,0);
+		boardno = ac_register_board(pci_resource_start(dev, 0),
+				RamIO, 0);
 		if (!boardno) {
 			printk(KERN_INFO "ac.o: PCI Applicom device doesn't have correct signature.\n");
 			iounmap(RamIO);
-- 
1.5.3.8


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

* [PATCH 2/2] Char: applicom, use pci_match_id
  2008-01-28  5:49         ` (Try#3) " WANG Cong
       [not found]           ` <1201691351-1038?= =?ISO-8859-1?Q?4-1-git-send-ema?= =?ISO-8859-1?Q?il-=1B[D>
  2008-01-30 11:13           ` Jiri Slaby
@ 2008-01-30 11:13           ` Jiri Slaby
  2008-01-30 23:10             ` Andrew Morton
  2 siblings, 1 reply; 22+ messages in thread
From: Jiri Slaby @ 2008-01-30 11:13 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, dwmw2, Jiri Slaby, WANG Cong

Instead of testing hardcoded values, use pci_match_id to reference the
pci_device_id table. Sideways, it allows easy new additions to the table.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
---
 drivers/char/applicom.c |   15 ++++-----------
 1 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c
index b0bb71b..64bf71c 100644
--- a/drivers/char/applicom.c
+++ b/drivers/char/applicom.c
@@ -57,7 +57,6 @@
 #define PCI_DEVICE_ID_APPLICOM_PCI2000IBS_CAN 0x0002
 #define PCI_DEVICE_ID_APPLICOM_PCI2000PFB     0x0003
 #endif
-#define MAX_PCI_DEVICE_NUM 3
 
 static char *applicom_pci_devnames[] = {
 	"PCI board",
@@ -66,12 +65,9 @@ static char *applicom_pci_devnames[] = {
 };
 
 static struct pci_device_id applicom_pci_tbl[] = {
-	{ PCI_VENDOR_ID_APPLICOM, PCI_DEVICE_ID_APPLICOM_PCIGENERIC,
-	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
-	{ PCI_VENDOR_ID_APPLICOM, PCI_DEVICE_ID_APPLICOM_PCI2000IBS_CAN,
-	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
-	{ PCI_VENDOR_ID_APPLICOM, PCI_DEVICE_ID_APPLICOM_PCI2000PFB,
-	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	{ PCI_VDEVICE(APPLICOM, PCI_DEVICE_ID_APPLICOM_PCIGENERIC) },
+	{ PCI_VDEVICE(APPLICOM, PCI_DEVICE_ID_APPLICOM_PCI2000IBS_CAN) },
+	{ PCI_VDEVICE(APPLICOM, PCI_DEVICE_ID_APPLICOM_PCI2000PFB) },
 	{ 0 }
 };
 MODULE_DEVICE_TABLE(pci, applicom_pci_tbl);
@@ -197,10 +193,7 @@ static int __init applicom_init(void)
 
 	while ( (dev = pci_get_class(PCI_CLASS_OTHERS << 16, dev))) {
 
-		if (dev->vendor != PCI_VENDOR_ID_APPLICOM)
-			continue;
-		
-		if (dev->device  > MAX_PCI_DEVICE_NUM || dev->device == 0)
+		if (!pci_match_id(applicom_pci_tbl, dev));
 			continue;
 		
 		if (pci_enable_device(dev))
-- 
1.5.3.8


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

* Re: [PATCH 2/2] Char: applicom, use pci_match_id
  2008-01-30 11:13           ` [PATCH 2/2] Char: applicom, use pci_match_id Jiri Slaby
@ 2008-01-30 23:10             ` Andrew Morton
  2008-01-31  9:26               ` Jiri Slaby
  0 siblings, 1 reply; 22+ messages in thread
From: Andrew Morton @ 2008-01-30 23:10 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: linux-kernel, dwmw2, jirislaby, xiyou.wangcong

On Wed, 30 Jan 2008 12:13:15 +0100
Jiri Slaby <jirislaby@gmail.com> wrote:

> +		if (!pci_match_id(applicom_pci_tbl, dev));
>  			continue;


The patch was carelessly prepared, was not runtine-tested and was not
passed through checkpatch, which detects this error.  Please fix these
things, permanently.

It's hard to overemphasise how out-of-balance the economics are here.  You
saved maybe thirty person-seconds by skipping the review and checkpatch
steps.  But the cost (if this bug had gone into mainline) would be many
many thousands times higher than this.

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

* Re: [PATCH 2/2] Char: applicom, use pci_match_id
  2008-01-30 23:10             ` Andrew Morton
@ 2008-01-31  9:26               ` Jiri Slaby
  0 siblings, 0 replies; 22+ messages in thread
From: Jiri Slaby @ 2008-01-31  9:26 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, dwmw2, xiyou.wangcong

On 01/31/2008 12:10 AM, Andrew Morton wrote:
> On Wed, 30 Jan 2008 12:13:15 +0100
> Jiri Slaby <jirislaby@gmail.com> wrote:
> 
>> +		if (!pci_match_id(applicom_pci_tbl, dev));
>>  			continue;
> 
> 
> The patch was carelessly prepared, was not runtine-tested and was not
> passed through checkpatch, which detects this error.  Please fix these
> things, permanently.

Yes, you're right, I definitely need to change my workflow, this needn't happen.

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

end of thread, other threads:[~2008-01-31  9:26 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-26  9:30 [Patch] Shut up warnings from files under drivers/ WANG Cong
2008-01-26  9:55 ` Jeff Garzik
2008-01-26 10:18   ` WANG Cong
2008-01-26 11:44     ` Jeff Garzik
2008-01-26 19:17   ` Sam Ravnborg
2008-01-26 19:30     ` Sam Ravnborg
2008-01-27  2:50     ` WANG Cong
2008-01-27  4:15     ` (Updated) " WANG Cong
2008-01-27  9:08       ` Jiri Slaby
2008-01-27  9:21         ` Jiri Slaby
2008-01-28  5:20           ` WANG Cong
2008-01-27  9:21       ` Sam Ravnborg
2008-01-28  5:49         ` (Try#3) " WANG Cong
     [not found]           ` <1201691351-1038?= =?ISO-8859-1?Q?4-1-git-send-ema?= =?ISO-8859-1?Q?il-=1B[D>
2008-01-30 11:10             ` [PATCH 1/2] Char: applicom, use pci_resource_start Jiri Slaby
2008-01-30 11:13           ` Jiri Slaby
2008-01-30 11:13           ` [PATCH 2/2] Char: applicom, use pci_match_id Jiri Slaby
2008-01-30 23:10             ` Andrew Morton
2008-01-31  9:26               ` Jiri Slaby
2008-01-26  9:57 ` [Patch] Shut up warnings from files under drivers/ Sam Ravnborg
2008-01-26 10:15   ` WANG Cong
2008-01-26 10:21   ` Sam Ravnborg
2008-01-26 10:26     ` WANG Cong

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).