linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/hwmon/ltq-cputemp.c:23:2: error: call to undeclared function 'ltq_cgu_w32'; ISO C99 and later do not support implicit function declarations
@ 2022-05-07 20:54 kernel test robot
  2022-05-09  0:03 ` Randy Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2022-05-07 20:54 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: llvm, kbuild-all, linux-kernel, Masahiro Yamada, Alex Shi,
	Nick Desaulniers, Miguel Ojeda, Nathan Chancellor

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   30c8e80f79329617012f07b09b70114592092ea4
commit: e8c07082a810fbb9db303a2b66b66b8d7e588b53 Kbuild: move to -std=gnu11
date:   8 weeks ago
config: mips-randconfig-r022-20220507 (https://download.01.org/0day-ci/archive/20220508/202205080416.vzIXy16B-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project af4cf1c6b8ed0d8102fc5e69acdc2fcbbcdaa9a7)
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 mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e8c07082a810fbb9db303a2b66b66b8d7e588b53
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout e8c07082a810fbb9db303a2b66b66b8d7e588b53
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

>> drivers/hwmon/ltq-cputemp.c:23:2: error: call to undeclared function 'ltq_cgu_w32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           ltq_cgu_w32(ltq_cgu_r32(CGU_GPHY1_CR) | CGU_TEMP_PD, CGU_GPHY1_CR);
           ^
>> drivers/hwmon/ltq-cputemp.c:23:14: error: call to undeclared function 'ltq_cgu_r32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           ltq_cgu_w32(ltq_cgu_r32(CGU_GPHY1_CR) | CGU_TEMP_PD, CGU_GPHY1_CR);
                       ^
   drivers/hwmon/ltq-cputemp.c:28:2: error: call to undeclared function 'ltq_cgu_w32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           ltq_cgu_w32(ltq_cgu_r32(CGU_GPHY1_CR) & ~CGU_TEMP_PD, CGU_GPHY1_CR);
           ^
   drivers/hwmon/ltq-cputemp.c:28:14: error: call to undeclared function 'ltq_cgu_r32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           ltq_cgu_w32(ltq_cgu_r32(CGU_GPHY1_CR) & ~CGU_TEMP_PD, CGU_GPHY1_CR);
                       ^
   drivers/hwmon/ltq-cputemp.c:39:12: error: call to undeclared function 'ltq_cgu_r32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                   value = (ltq_cgu_r32(CGU_GPHY1_CR) >> 9) & 0x01FF;
                            ^
   drivers/hwmon/ltq-cputemp.c:92:24: error: use of undeclared identifier 'SOC_TYPE_VR9_2'
           if (ltq_soc_type() != SOC_TYPE_VR9_2)
                                 ^
   6 errors generated.


vim +/ltq_cgu_w32 +23 drivers/hwmon/ltq-cputemp.c

7074d0a9275860 Florian Eckert 2017-09-01  20  
7074d0a9275860 Florian Eckert 2017-09-01  21  static void ltq_cputemp_enable(void)
7074d0a9275860 Florian Eckert 2017-09-01  22  {
7074d0a9275860 Florian Eckert 2017-09-01 @23  	ltq_cgu_w32(ltq_cgu_r32(CGU_GPHY1_CR) | CGU_TEMP_PD, CGU_GPHY1_CR);
7074d0a9275860 Florian Eckert 2017-09-01  24  }
7074d0a9275860 Florian Eckert 2017-09-01  25  

:::::: The code at line 23 was first introduced by commit
:::::: 7074d0a92758603369655ef5d4f49e6caaae0b4e hwmon: (ltq-cputemp) add cpu temp sensor driver

:::::: TO: Florian Eckert <fe@dev.tdt.de>
:::::: CC: Guenter Roeck <linux@roeck-us.net>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

* Re: drivers/hwmon/ltq-cputemp.c:23:2: error: call to undeclared function 'ltq_cgu_w32'; ISO C99 and later do not support implicit function declarations
  2022-05-07 20:54 drivers/hwmon/ltq-cputemp.c:23:2: error: call to undeclared function 'ltq_cgu_w32'; ISO C99 and later do not support implicit function declarations kernel test robot
@ 2022-05-09  0:03 ` Randy Dunlap
  2022-05-09  8:17   ` Florian Eckert
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2022-05-09  0:03 UTC (permalink / raw)
  To: kernel test robot, Arnd Bergmann, Florian Eckert
  Cc: llvm, kbuild-all, linux-kernel, Masahiro Yamada, Alex Shi,
	Nick Desaulniers, Miguel Ojeda, Nathan Chancellor, Guenter Roeck

Hi--

Adding TO: and CC: that are at end of message but are not
included originally.


On 5/7/22 13:54, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   30c8e80f79329617012f07b09b70114592092ea4
> commit: e8c07082a810fbb9db303a2b66b66b8d7e588b53 Kbuild: move to -std=gnu11
> date:   8 weeks ago
> config: mips-randconfig-r022-20220507 (https://download.01.org/0day-ci/archive/20220508/202205080416.vzIXy16B-lkp@intel.com/config)
> compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project af4cf1c6b8ed0d8102fc5e69acdc2fcbbcdaa9a7)
> 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 mips cross compiling tool for clang build
>         # apt-get install binutils-mips-linux-gnu
>         # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e8c07082a810fbb9db303a2b66b66b8d7e588b53
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout e8c07082a810fbb9db303a2b66b66b8d7e588b53
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>>> drivers/hwmon/ltq-cputemp.c:23:2: error: call to undeclared function 'ltq_cgu_w32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>            ltq_cgu_w32(ltq_cgu_r32(CGU_GPHY1_CR) | CGU_TEMP_PD, CGU_GPHY1_CR);
>            ^
>>> drivers/hwmon/ltq-cputemp.c:23:14: error: call to undeclared function 'ltq_cgu_r32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>            ltq_cgu_w32(ltq_cgu_r32(CGU_GPHY1_CR) | CGU_TEMP_PD, CGU_GPHY1_CR);
>                        ^
>    drivers/hwmon/ltq-cputemp.c:28:2: error: call to undeclared function 'ltq_cgu_w32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>            ltq_cgu_w32(ltq_cgu_r32(CGU_GPHY1_CR) & ~CGU_TEMP_PD, CGU_GPHY1_CR);
>            ^
>    drivers/hwmon/ltq-cputemp.c:28:14: error: call to undeclared function 'ltq_cgu_r32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>            ltq_cgu_w32(ltq_cgu_r32(CGU_GPHY1_CR) & ~CGU_TEMP_PD, CGU_GPHY1_CR);
>                        ^
>    drivers/hwmon/ltq-cputemp.c:39:12: error: call to undeclared function 'ltq_cgu_r32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>                    value = (ltq_cgu_r32(CGU_GPHY1_CR) >> 9) & 0x01FF;
>                             ^
>    drivers/hwmon/ltq-cputemp.c:92:24: error: use of undeclared identifier 'SOC_TYPE_VR9_2'
>            if (ltq_soc_type() != SOC_TYPE_VR9_2)
>                                  ^
>    6 errors generated.
> 
> 
> vim +/ltq_cgu_w32 +23 drivers/hwmon/ltq-cputemp.c
> 
> 7074d0a9275860 Florian Eckert 2017-09-01  20  
> 7074d0a9275860 Florian Eckert 2017-09-01  21  static void ltq_cputemp_enable(void)
> 7074d0a9275860 Florian Eckert 2017-09-01  22  {
> 7074d0a9275860 Florian Eckert 2017-09-01 @23  	ltq_cgu_w32(ltq_cgu_r32(CGU_GPHY1_CR) | CGU_TEMP_PD, CGU_GPHY1_CR);
> 7074d0a9275860 Florian Eckert 2017-09-01  24  }
> 7074d0a9275860 Florian Eckert 2017-09-01  25  
> 
> :::::: The code at line 23 was first introduced by commit
> :::::: 7074d0a92758603369655ef5d4f49e6caaae0b4e hwmon: (ltq-cputemp) add cpu temp sensor driver
> 
> :::::: TO: Florian Eckert <fe@dev.tdt.de>
> :::::: CC: Guenter Roeck <linux@roeck-us.net>

This driver builds fine if I change it from SOC_FALCON to SOC_XWAY.
Maybe its Kconfig entry should be stronger?

config SENSORS_LTQ_CPUTEMP
	bool "Lantiq cpu temperature sensor driver"
-	depends on LANTIQ
+	depends on SOC_XWAY

?

-- 
~Randy

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

* Re: drivers/hwmon/ltq-cputemp.c:23:2: error: call to undeclared function 'ltq_cgu_w32'; ISO C99 and later do not support implicit function declarations
  2022-05-09  0:03 ` Randy Dunlap
@ 2022-05-09  8:17   ` Florian Eckert
  2022-05-09 23:03     ` Guenter Roeck
  0 siblings, 1 reply; 4+ messages in thread
From: Florian Eckert @ 2022-05-09  8:17 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: kernel test robot, Arnd Bergmann, llvm, kbuild-all, linux-kernel,
	Masahiro Yamada, Alex Shi, Nick Desaulniers, Miguel Ojeda,
	Nathan Chancellor, Guenter Roeck


>> 
>> vim +/ltq_cgu_w32 +23 drivers/hwmon/ltq-cputemp.c
>> 
>> 7074d0a9275860 Florian Eckert 2017-09-01  20
>> 7074d0a9275860 Florian Eckert 2017-09-01  21  static void 
>> ltq_cputemp_enable(void)
>> 7074d0a9275860 Florian Eckert 2017-09-01  22  {
>> 7074d0a9275860 Florian Eckert 2017-09-01 @23  
>> 	ltq_cgu_w32(ltq_cgu_r32(CGU_GPHY1_CR) | CGU_TEMP_PD, CGU_GPHY1_CR);
>> 7074d0a9275860 Florian Eckert 2017-09-01  24  }
>> 7074d0a9275860 Florian Eckert 2017-09-01  25
>> 
>> :::::: The code at line 23 was first introduced by commit
>> :::::: 7074d0a92758603369655ef5d4f49e6caaae0b4e hwmon: (ltq-cputemp) 
>> add cpu temp sensor driver
>> 
>> :::::: TO: Florian Eckert <fe@dev.tdt.de>
>> :::::: CC: Guenter Roeck <linux@roeck-us.net>
> 
> This driver builds fine if I change it from SOC_FALCON to SOC_XWAY.
> Maybe its Kconfig entry should be stronger?
> 
> config SENSORS_LTQ_CPUTEMP
> 	bool "Lantiq cpu temperature sensor driver"
> -	depends on LANTIQ
> +	depends on SOC_XWAY

Fine with me. I think it's better to narrow it down.
Because this macro is only available for the SOC_TYPE_XWAY [1]

[1] 
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h?h=v5.17.6#n10

Best regards
-- Florian

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

* Re: drivers/hwmon/ltq-cputemp.c:23:2: error: call to undeclared function 'ltq_cgu_w32'; ISO C99 and later do not support implicit function declarations
  2022-05-09  8:17   ` Florian Eckert
@ 2022-05-09 23:03     ` Guenter Roeck
  0 siblings, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2022-05-09 23:03 UTC (permalink / raw)
  To: Florian Eckert, Randy Dunlap
  Cc: kernel test robot, Arnd Bergmann, llvm, kbuild-all, linux-kernel,
	Masahiro Yamada, Alex Shi, Nick Desaulniers, Miguel Ojeda,
	Nathan Chancellor

On 5/9/22 01:17, Florian Eckert wrote:
> 
>>>
>>> vim +/ltq_cgu_w32 +23 drivers/hwmon/ltq-cputemp.c
>>>
>>> 7074d0a9275860 Florian Eckert 2017-09-01  20
>>> 7074d0a9275860 Florian Eckert 2017-09-01  21  static void ltq_cputemp_enable(void)
>>> 7074d0a9275860 Florian Eckert 2017-09-01  22  {
>>> 7074d0a9275860 Florian Eckert 2017-09-01 @23     ltq_cgu_w32(ltq_cgu_r32(CGU_GPHY1_CR) | CGU_TEMP_PD, CGU_GPHY1_CR);
>>> 7074d0a9275860 Florian Eckert 2017-09-01  24  }
>>> 7074d0a9275860 Florian Eckert 2017-09-01  25
>>>
>>> :::::: The code at line 23 was first introduced by commit
>>> :::::: 7074d0a92758603369655ef5d4f49e6caaae0b4e hwmon: (ltq-cputemp) add cpu temp sensor driver
>>>
>>> :::::: TO: Florian Eckert <fe@dev.tdt.de>
>>> :::::: CC: Guenter Roeck <linux@roeck-us.net>
>>
>> This driver builds fine if I change it from SOC_FALCON to SOC_XWAY.
>> Maybe its Kconfig entry should be stronger?
>>
>> config SENSORS_LTQ_CPUTEMP
>>     bool "Lantiq cpu temperature sensor driver"
>> -    depends on LANTIQ
>> +    depends on SOC_XWAY
> 
> Fine with me. I think it's better to narrow it down.

I'll be happy to accept a patch doing that.

Guenter


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

end of thread, other threads:[~2022-05-09 23:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-07 20:54 drivers/hwmon/ltq-cputemp.c:23:2: error: call to undeclared function 'ltq_cgu_w32'; ISO C99 and later do not support implicit function declarations kernel test robot
2022-05-09  0:03 ` Randy Dunlap
2022-05-09  8:17   ` Florian Eckert
2022-05-09 23:03     ` Guenter Roeck

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