lkml.org 
[lkml]   [2008]   [Jan]   [27]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 27 Jan 2008 10:21:00 +0100
FromSam Ravnborg <>
SubjectRe: (Updated) [Patch] Shut up warnings from files under drivers/
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


\
 
 \ /
  Last update: 2008-01-27 10:23    [from the cache]
©2003-2008