linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 11942/12503] drivers/video/fbdev/aty/atyfb_base.c:180:6: warning: no previous prototype for function 'aty_st_lcd'
@ 2021-02-24 12:46 kernel test robot
  2021-02-24 20:03 ` Randy Dunlap
  0 siblings, 1 reply; 6+ messages in thread
From: kernel test robot @ 2021-02-24 12:46 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: kbuild-all, clang-built-linux, Linux Memory Management List,
	Daniel Vetter

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

Hi Randy,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   577c283560fe8a81a23a95654c6d13e8412d22f1
commit: bfa5782b9caa26f93f42ad79804e1f75a1ce9f18 [11942/12503] fbdev: atyfb: add stubs for aty_{ld,st}_lcd()
config: arm64-randconfig-r004-20210223 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project f14a14dd2564703db02f80c00db8ae492b594f77)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=bfa5782b9caa26f93f42ad79804e1f75a1ce9f18
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout bfa5782b9caa26f93f42ad79804e1f75a1ce9f18
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/video/fbdev/aty/atyfb_base.c:180:6: warning: no previous prototype for function 'aty_st_lcd' [-Wmissing-prototypes]
   void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
        ^
   drivers/video/fbdev/aty/atyfb_base.c:180:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
   ^
   static 
>> drivers/video/fbdev/aty/atyfb_base.c:183:5: warning: no previous prototype for function 'aty_ld_lcd' [-Wmissing-prototypes]
   u32 aty_ld_lcd(int index, const struct atyfb_par *par)
       ^
   drivers/video/fbdev/aty/atyfb_base.c:183:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   u32 aty_ld_lcd(int index, const struct atyfb_par *par)
   ^
   static 
   2 warnings generated.


vim +/aty_st_lcd +180 drivers/video/fbdev/aty/atyfb_base.c

   163	
   164	u32 aty_ld_lcd(int index, const struct atyfb_par *par)
   165	{
   166		if (M64_HAS(LT_LCD_REGS)) {
   167			return aty_ld_le32(lt_lcd_regs[index], par);
   168		} else {
   169			unsigned long temp;
   170	
   171			/* write addr byte */
   172			temp = aty_ld_le32(LCD_INDEX, par);
   173			aty_st_le32(LCD_INDEX, (temp & ~LCD_INDEX_MASK) | index, par);
   174			/* read the register value */
   175			return aty_ld_le32(LCD_DATA, par);
   176		}
   177	}
   178	#else /* defined(CONFIG_PMAC_BACKLIGHT) || defined(CONFIG_FB_ATY_BACKLIGHT) \
   179		 defined(CONFIG_FB_ATY_GENERIC_LCD) */
 > 180	void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
   181	{ }
   182	
 > 183	u32 aty_ld_lcd(int index, const struct atyfb_par *par)
   184	{
   185		return 0;
   186	}
   187	#endif /* defined(CONFIG_PMAC_BACKLIGHT) || defined (CONFIG_FB_ATY_GENERIC_LCD) */
   188	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 42477 bytes --]

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

* Re: [linux-next:master 11942/12503] drivers/video/fbdev/aty/atyfb_base.c:180:6: warning: no previous prototype for function 'aty_st_lcd'
  2021-02-24 12:46 [linux-next:master 11942/12503] drivers/video/fbdev/aty/atyfb_base.c:180:6: warning: no previous prototype for function 'aty_st_lcd' kernel test robot
@ 2021-02-24 20:03 ` Randy Dunlap
  2021-02-24 20:42   ` Nick Desaulniers
  0 siblings, 1 reply; 6+ messages in thread
From: Randy Dunlap @ 2021-02-24 20:03 UTC (permalink / raw)
  To: kernel test robot
  Cc: kbuild-all, clang-built-linux, Linux Memory Management List,
	Daniel Vetter

On 2/24/21 4:46 AM, kernel test robot wrote:
> Hi Randy,
> 
> FYI, the error/warning still remains.
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   577c283560fe8a81a23a95654c6d13e8412d22f1
> commit: bfa5782b9caa26f93f42ad79804e1f75a1ce9f18 [11942/12503] fbdev: atyfb: add stubs for aty_{ld,st}_lcd()
> config: arm64-randconfig-r004-20210223 (attached as .config)
> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project f14a14dd2564703db02f80c00db8ae492b594f77)
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # install arm64 cross compiling tool for clang build
>         # apt-get install binutils-aarch64-linux-gnu
>         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=bfa5782b9caa26f93f42ad79804e1f75a1ce9f18
>         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>         git fetch --no-tags linux-next master
>         git checkout bfa5782b9caa26f93f42ad79804e1f75a1ce9f18
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
>>> drivers/video/fbdev/aty/atyfb_base.c:180:6: warning: no previous prototype for function 'aty_st_lcd' [-Wmissing-prototypes]
>    void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
>         ^
>    drivers/video/fbdev/aty/atyfb_base.c:180:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
>    void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
>    ^
>    static 
>>> drivers/video/fbdev/aty/atyfb_base.c:183:5: warning: no previous prototype for function 'aty_ld_lcd' [-Wmissing-prototypes]
>    u32 aty_ld_lcd(int index, const struct atyfb_par *par)
>        ^
>    drivers/video/fbdev/aty/atyfb_base.c:183:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
>    u32 aty_ld_lcd(int index, const struct atyfb_par *par)
>    ^
>    static 
>    2 warnings generated.
> 

These 2 functions are also used/usable (depending on CONFIG options) in
mach64_ct.c so they can't be static.

AFAIK, we don't make functions have different qualifiers depending on
config options.

> 
> vim +/aty_st_lcd +180 drivers/video/fbdev/aty/atyfb_base.c
> 
>    163	
>    164	u32 aty_ld_lcd(int index, const struct atyfb_par *par)
>    165	{
>    166		if (M64_HAS(LT_LCD_REGS)) {
>    167			return aty_ld_le32(lt_lcd_regs[index], par);
>    168		} else {
>    169			unsigned long temp;
>    170	
>    171			/* write addr byte */
>    172			temp = aty_ld_le32(LCD_INDEX, par);
>    173			aty_st_le32(LCD_INDEX, (temp & ~LCD_INDEX_MASK) | index, par);
>    174			/* read the register value */
>    175			return aty_ld_le32(LCD_DATA, par);
>    176		}
>    177	}
>    178	#else /* defined(CONFIG_PMAC_BACKLIGHT) || defined(CONFIG_FB_ATY_BACKLIGHT) \
>    179		 defined(CONFIG_FB_ATY_GENERIC_LCD) */
>  > 180	void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
>    181	{ }
>    182	
>  > 183	u32 aty_ld_lcd(int index, const struct atyfb_par *par)
>    184	{
>    185		return 0;
>    186	}
>    187	#endif /* defined(CONFIG_PMAC_BACKLIGHT) || defined (CONFIG_FB_ATY_GENERIC_LCD) */
>    188	
> 
> ---


-- 
~Randy



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

* Re: [linux-next:master 11942/12503] drivers/video/fbdev/aty/atyfb_base.c:180:6: warning: no previous prototype for function 'aty_st_lcd'
  2021-02-24 20:03 ` Randy Dunlap
@ 2021-02-24 20:42   ` Nick Desaulniers
  2021-02-24 21:02     ` Randy Dunlap
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Desaulniers @ 2021-02-24 20:42 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: kernel test robot, kbuild-all, clang-built-linux,
	Linux Memory Management List, Daniel Vetter

On Wed, Feb 24, 2021 at 12:03 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> On 2/24/21 4:46 AM, kernel test robot wrote:
> > Hi Randy,
> >
> > FYI, the error/warning still remains.
> >
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head:   577c283560fe8a81a23a95654c6d13e8412d22f1
> > commit: bfa5782b9caa26f93f42ad79804e1f75a1ce9f18 [11942/12503] fbdev: atyfb: add stubs for aty_{ld,st}_lcd()
> > config: arm64-randconfig-r004-20210223 (attached as .config)
> > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project f14a14dd2564703db02f80c00db8ae492b594f77)
> > reproduce (this is a W=1 build):
> >         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> >         chmod +x ~/bin/make.cross
> >         # install arm64 cross compiling tool for clang build
> >         # apt-get install binutils-aarch64-linux-gnu
> >         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=bfa5782b9caa26f93f42ad79804e1f75a1ce9f18
> >         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> >         git fetch --no-tags linux-next master
> >         git checkout bfa5782b9caa26f93f42ad79804e1f75a1ce9f18
> >         # save the attached .config to linux build tree
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All warnings (new ones prefixed by >>):
> >
> >>> drivers/video/fbdev/aty/atyfb_base.c:180:6: warning: no previous prototype for function 'aty_st_lcd' [-Wmissing-prototypes]
> >    void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
> >         ^
> >    drivers/video/fbdev/aty/atyfb_base.c:180:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> >    void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
> >    ^
> >    static
> >>> drivers/video/fbdev/aty/atyfb_base.c:183:5: warning: no previous prototype for function 'aty_ld_lcd' [-Wmissing-prototypes]
> >    u32 aty_ld_lcd(int index, const struct atyfb_par *par)
> >        ^
> >    drivers/video/fbdev/aty/atyfb_base.c:183:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> >    u32 aty_ld_lcd(int index, const struct atyfb_par *par)
> >    ^
> >    static
> >    2 warnings generated.
> >
>
> These 2 functions are also used/usable (depending on CONFIG options) in
> mach64_ct.c so they can't be static.
>
> AFAIK, we don't make functions have different qualifiers depending on
> config options.

Is there a shared header included by both mach64_ct.c and atyfb_base.c
you could provide a declaration in, that way should the definition
change we'd catch such a change in order to not break the callers?

>
> >
> > vim +/aty_st_lcd +180 drivers/video/fbdev/aty/atyfb_base.c
> >
> >    163
> >    164        u32 aty_ld_lcd(int index, const struct atyfb_par *par)
> >    165        {
> >    166                if (M64_HAS(LT_LCD_REGS)) {
> >    167                        return aty_ld_le32(lt_lcd_regs[index], par);
> >    168                } else {
> >    169                        unsigned long temp;
> >    170
> >    171                        /* write addr byte */
> >    172                        temp = aty_ld_le32(LCD_INDEX, par);
> >    173                        aty_st_le32(LCD_INDEX, (temp & ~LCD_INDEX_MASK) | index, par);
> >    174                        /* read the register value */
> >    175                        return aty_ld_le32(LCD_DATA, par);
> >    176                }
> >    177        }
> >    178        #else /* defined(CONFIG_PMAC_BACKLIGHT) || defined(CONFIG_FB_ATY_BACKLIGHT) \
> >    179                 defined(CONFIG_FB_ATY_GENERIC_LCD) */
> >  > 180        void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
> >    181        { }
> >    182
> >  > 183        u32 aty_ld_lcd(int index, const struct atyfb_par *par)
> >    184        {
> >    185                return 0;
> >    186        }
> >    187        #endif /* defined(CONFIG_PMAC_BACKLIGHT) || defined (CONFIG_FB_ATY_GENERIC_LCD) */
> >    188
> >
> > ---
>
>
> --
> ~Randy
>
> --
> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/97716bb9-6aca-d7e6-e390-1b9d3a0b99a8%40infradead.org.



-- 
Thanks,
~Nick Desaulniers


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

* Re: [linux-next:master 11942/12503] drivers/video/fbdev/aty/atyfb_base.c:180:6: warning: no previous prototype for function 'aty_st_lcd'
  2021-02-24 20:42   ` Nick Desaulniers
@ 2021-02-24 21:02     ` Randy Dunlap
  2021-02-24 21:05       ` Randy Dunlap
  0 siblings, 1 reply; 6+ messages in thread
From: Randy Dunlap @ 2021-02-24 21:02 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: kernel test robot, kbuild-all, clang-built-linux,
	Linux Memory Management List, Daniel Vetter

On 2/24/21 12:42 PM, Nick Desaulniers wrote:
> On Wed, Feb 24, 2021 at 12:03 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>>
>> On 2/24/21 4:46 AM, kernel test robot wrote:
>>> Hi Randy,
>>>
>>> FYI, the error/warning still remains.
>>>
>>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>>> head:   577c283560fe8a81a23a95654c6d13e8412d22f1
>>> commit: bfa5782b9caa26f93f42ad79804e1f75a1ce9f18 [11942/12503] fbdev: atyfb: add stubs for aty_{ld,st}_lcd()
>>> config: arm64-randconfig-r004-20210223 (attached as .config)
>>> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project f14a14dd2564703db02f80c00db8ae492b594f77)
>>> reproduce (this is a W=1 build):
>>>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>>         chmod +x ~/bin/make.cross
>>>         # install arm64 cross compiling tool for clang build
>>>         # apt-get install binutils-aarch64-linux-gnu
>>>         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=bfa5782b9caa26f93f42ad79804e1f75a1ce9f18
>>>         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>>>         git fetch --no-tags linux-next master
>>>         git checkout bfa5782b9caa26f93f42ad79804e1f75a1ce9f18
>>>         # save the attached .config to linux build tree
>>>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
>>>
>>> If you fix the issue, kindly add following tag as appropriate
>>> Reported-by: kernel test robot <lkp@intel.com>
>>>
>>> All warnings (new ones prefixed by >>):
>>>
>>>>> drivers/video/fbdev/aty/atyfb_base.c:180:6: warning: no previous prototype for function 'aty_st_lcd' [-Wmissing-prototypes]
>>>    void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
>>>         ^
>>>    drivers/video/fbdev/aty/atyfb_base.c:180:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
>>>    void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
>>>    ^
>>>    static
>>>>> drivers/video/fbdev/aty/atyfb_base.c:183:5: warning: no previous prototype for function 'aty_ld_lcd' [-Wmissing-prototypes]
>>>    u32 aty_ld_lcd(int index, const struct atyfb_par *par)
>>>        ^
>>>    drivers/video/fbdev/aty/atyfb_base.c:183:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
>>>    u32 aty_ld_lcd(int index, const struct atyfb_par *par)
>>>    ^
>>>    static
>>>    2 warnings generated.
>>>
>>
>> These 2 functions are also used/usable (depending on CONFIG options) in
>> mach64_ct.c so they can't be static.
>>
>> AFAIK, we don't make functions have different qualifiers depending on
>> config options.
> 
> Is there a shared header included by both mach64_ct.c and atyfb_base.c
> you could provide a declaration in, that way should the definition
> change we'd catch such a change in order to not break the callers?
> 

atyfb.h:

#if defined(CONFIG_PMAC_BACKLIGHT) || defined (CONFIG_FB_ATY_GENERIC_LCD) || \
defined (CONFIG_FB_ATY_BACKLIGHT)
extern void aty_st_lcd(int index, u32 val, const struct atyfb_par *par);
extern u32 aty_ld_lcd(int index, const struct atyfb_par *par);
#endif

so it's already there unless the .config did not include those #ifdef CONFIG_s.
I'll recheck that.


-- 
~Randy



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

* Re: [linux-next:master 11942/12503] drivers/video/fbdev/aty/atyfb_base.c:180:6: warning: no previous prototype for function 'aty_st_lcd'
  2021-02-24 21:02     ` Randy Dunlap
@ 2021-02-24 21:05       ` Randy Dunlap
  2021-02-24 21:18         ` Randy Dunlap
  0 siblings, 1 reply; 6+ messages in thread
From: Randy Dunlap @ 2021-02-24 21:05 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: kernel test robot, kbuild-all, clang-built-linux,
	Linux Memory Management List, Daniel Vetter

On 2/24/21 1:02 PM, Randy Dunlap wrote:
> On 2/24/21 12:42 PM, Nick Desaulniers wrote:
>> On Wed, Feb 24, 2021 at 12:03 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>>>
>>> On 2/24/21 4:46 AM, kernel test robot wrote:
>>>> Hi Randy,
>>>>
>>>> FYI, the error/warning still remains.
>>>>
>>>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>>>> head:   577c283560fe8a81a23a95654c6d13e8412d22f1
>>>> commit: bfa5782b9caa26f93f42ad79804e1f75a1ce9f18 [11942/12503] fbdev: atyfb: add stubs for aty_{ld,st}_lcd()
>>>> config: arm64-randconfig-r004-20210223 (attached as .config)
>>>> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project f14a14dd2564703db02f80c00db8ae492b594f77)
>>>> reproduce (this is a W=1 build):
>>>>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>>>         chmod +x ~/bin/make.cross
>>>>         # install arm64 cross compiling tool for clang build
>>>>         # apt-get install binutils-aarch64-linux-gnu
>>>>         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=bfa5782b9caa26f93f42ad79804e1f75a1ce9f18
>>>>         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>>>>         git fetch --no-tags linux-next master
>>>>         git checkout bfa5782b9caa26f93f42ad79804e1f75a1ce9f18
>>>>         # save the attached .config to linux build tree
>>>>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
>>>>
>>>> If you fix the issue, kindly add following tag as appropriate
>>>> Reported-by: kernel test robot <lkp@intel.com>
>>>>
>>>> All warnings (new ones prefixed by >>):
>>>>
>>>>>> drivers/video/fbdev/aty/atyfb_base.c:180:6: warning: no previous prototype for function 'aty_st_lcd' [-Wmissing-prototypes]
>>>>    void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
>>>>         ^
>>>>    drivers/video/fbdev/aty/atyfb_base.c:180:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
>>>>    void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
>>>>    ^
>>>>    static
>>>>>> drivers/video/fbdev/aty/atyfb_base.c:183:5: warning: no previous prototype for function 'aty_ld_lcd' [-Wmissing-prototypes]
>>>>    u32 aty_ld_lcd(int index, const struct atyfb_par *par)
>>>>        ^
>>>>    drivers/video/fbdev/aty/atyfb_base.c:183:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
>>>>    u32 aty_ld_lcd(int index, const struct atyfb_par *par)
>>>>    ^
>>>>    static
>>>>    2 warnings generated.
>>>>
>>>
>>> These 2 functions are also used/usable (depending on CONFIG options) in
>>> mach64_ct.c so they can't be static.
>>>
>>> AFAIK, we don't make functions have different qualifiers depending on
>>> config options.
>>
>> Is there a shared header included by both mach64_ct.c and atyfb_base.c
>> you could provide a declaration in, that way should the definition
>> change we'd catch such a change in order to not break the callers?
>>
> 
> atyfb.h:
> 
> #if defined(CONFIG_PMAC_BACKLIGHT) || defined (CONFIG_FB_ATY_GENERIC_LCD) || \
> defined (CONFIG_FB_ATY_BACKLIGHT)
> extern void aty_st_lcd(int index, u32 val, const struct atyfb_par *par);
> extern u32 aty_ld_lcd(int index, const struct atyfb_par *par);
> #endif
> 
> so it's already there unless the .config did not include those #ifdef CONFIG_s.
> I'll recheck that.

OK, none of those 3 kconfig symbols is set. I'll check again where the
usage is.


-- 
~Randy



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

* Re: [linux-next:master 11942/12503] drivers/video/fbdev/aty/atyfb_base.c:180:6: warning: no previous prototype for function 'aty_st_lcd'
  2021-02-24 21:05       ` Randy Dunlap
@ 2021-02-24 21:18         ` Randy Dunlap
  0 siblings, 0 replies; 6+ messages in thread
From: Randy Dunlap @ 2021-02-24 21:18 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: kernel test robot, kbuild-all, clang-built-linux,
	Linux Memory Management List, Daniel Vetter

On 2/24/21 1:05 PM, Randy Dunlap wrote:
> On 2/24/21 1:02 PM, Randy Dunlap wrote:
>> On 2/24/21 12:42 PM, Nick Desaulniers wrote:
>>> On Wed, Feb 24, 2021 at 12:03 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>>>>
>>>> On 2/24/21 4:46 AM, kernel test robot wrote:
>>>>> Hi Randy,
>>>>>
>>>>> FYI, the error/warning still remains.
>>>>>
>>>>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>>>>> head:   577c283560fe8a81a23a95654c6d13e8412d22f1
>>>>> commit: bfa5782b9caa26f93f42ad79804e1f75a1ce9f18 [11942/12503] fbdev: atyfb: add stubs for aty_{ld,st}_lcd()
>>>>> config: arm64-randconfig-r004-20210223 (attached as .config)
>>>>> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project f14a14dd2564703db02f80c00db8ae492b594f77)
>>>>> reproduce (this is a W=1 build):
>>>>>          wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>>>>          chmod +x ~/bin/make.cross
>>>>>          # install arm64 cross compiling tool for clang build
>>>>>          # apt-get install binutils-aarch64-linux-gnu
>>>>>          # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=bfa5782b9caa26f93f42ad79804e1f75a1ce9f18
>>>>>          git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>>>>>          git fetch --no-tags linux-next master
>>>>>          git checkout bfa5782b9caa26f93f42ad79804e1f75a1ce9f18
>>>>>          # save the attached .config to linux build tree
>>>>>          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
>>>>>
>>>>> If you fix the issue, kindly add following tag as appropriate
>>>>> Reported-by: kernel test robot <lkp@intel.com>
>>>>>
>>>>> All warnings (new ones prefixed by >>):
>>>>>
>>>>>>> drivers/video/fbdev/aty/atyfb_base.c:180:6: warning: no previous prototype for function 'aty_st_lcd' [-Wmissing-prototypes]
>>>>>     void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
>>>>>          ^
>>>>>     drivers/video/fbdev/aty/atyfb_base.c:180:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
>>>>>     void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
>>>>>     ^
>>>>>     static
>>>>>>> drivers/video/fbdev/aty/atyfb_base.c:183:5: warning: no previous prototype for function 'aty_ld_lcd' [-Wmissing-prototypes]
>>>>>     u32 aty_ld_lcd(int index, const struct atyfb_par *par)
>>>>>         ^
>>>>>     drivers/video/fbdev/aty/atyfb_base.c:183:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
>>>>>     u32 aty_ld_lcd(int index, const struct atyfb_par *par)
>>>>>     ^
>>>>>     static
>>>>>     2 warnings generated.
>>>>>
>>>>
>>>> These 2 functions are also used/usable (depending on CONFIG options) in
>>>> mach64_ct.c so they can't be static.
>>>>
>>>> AFAIK, we don't make functions have different qualifiers depending on
>>>> config options.
>>>
>>> Is there a shared header included by both mach64_ct.c and atyfb_base.c
>>> you could provide a declaration in, that way should the definition
>>> change we'd catch such a change in order to not break the callers?
>>>
>>
>> atyfb.h:
>>
>> #if defined(CONFIG_PMAC_BACKLIGHT) || defined (CONFIG_FB_ATY_GENERIC_LCD) || \
>> defined (CONFIG_FB_ATY_BACKLIGHT)
>> extern void aty_st_lcd(int index, u32 val, const struct atyfb_par *par);
>> extern u32 aty_ld_lcd(int index, const struct atyfb_par *par);
>> #endif
>>
>> so it's already there unless the .config did not include those #ifdef CONFIG_s.
>> I'll recheck that.
> 
> OK, none of those 3 kconfig symbols is set. I'll check again where the
> usage is.

I think I just need to make them always visible in atyfb.h.
I'll test that and then send a patch.


~Randy


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

end of thread, other threads:[~2021-02-24 21:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-24 12:46 [linux-next:master 11942/12503] drivers/video/fbdev/aty/atyfb_base.c:180:6: warning: no previous prototype for function 'aty_st_lcd' kernel test robot
2021-02-24 20:03 ` Randy Dunlap
2021-02-24 20:42   ` Nick Desaulniers
2021-02-24 21:02     ` Randy Dunlap
2021-02-24 21:05       ` Randy Dunlap
2021-02-24 21:18         ` Randy Dunlap

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