* drivers/cpuidle/cpuidle-riscv-sbi.c:350:5: warning: format specifies type 'long' but the argument has type 'int'
@ 2022-04-16 3:09 kernel test robot
2022-04-17 21:36 ` Randy Dunlap
0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2022-04-16 3:09 UTC (permalink / raw)
To: Anup Patel; +Cc: llvm, kbuild-all, linux-kernel, Palmer Dabbelt
Hi Anup,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 59250f8a7f3a60a2661b84cbafc1e0eb5d05ec9b
commit: 6abf32f1d9c5009dcccded2c1e7ca899a4ab587b cpuidle: Add RISC-V SBI CPU idle driver
date: 5 weeks ago
config: riscv-randconfig-r026-20220416 (https://download.01.org/0day-ci/archive/20220416/202204161152.YXsVu0jD-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 8e43cbab33765c476337571e5ed11b005199dd0d)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6abf32f1d9c5009dcccded2c1e7ca899a4ab587b
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 6abf32f1d9c5009dcccded2c1e7ca899a4ab587b
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/cpuidle/
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/cpuidle/cpuidle-riscv-sbi.c:350:5: error: implicit declaration of function 'cpuid_to_hartid_map' [-Werror,-Wimplicit-function-declaration]
cpuid_to_hartid_map(cpu));
^
>> drivers/cpuidle/cpuidle-riscv-sbi.c:350:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat]
cpuid_to_hartid_map(cpu));
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:576:38: note: expanded from macro 'pr_debug'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:132:17: note: expanded from macro 'no_printk'
printk(fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
include/linux/printk.h:446:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
drivers/cpuidle/cpuidle-riscv-sbi.c:359:10: error: implicit declaration of function 'cpuid_to_hartid_map' [-Werror,-Wimplicit-function-declaration]
cpuid_to_hartid_map(cpu));
^
drivers/cpuidle/cpuidle-riscv-sbi.c:359:10: warning: format specifies type 'long' but the argument has type 'int' [-Wformat]
cpuid_to_hartid_map(cpu));
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:489:33: note: expanded from macro 'pr_err'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:446:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
drivers/cpuidle/cpuidle-riscv-sbi.c:567:6: error: implicit declaration of function 'cpuid_to_hartid_map' [-Werror,-Wimplicit-function-declaration]
cpuid_to_hartid_map(cpu));
^
drivers/cpuidle/cpuidle-riscv-sbi.c:567:6: warning: format specifies type 'long' but the argument has type 'int' [-Wformat]
cpuid_to_hartid_map(cpu));
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:576:38: note: expanded from macro 'pr_debug'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:132:17: note: expanded from macro 'no_printk'
printk(fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
include/linux/printk.h:446:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
3 warnings and 3 errors generated.
vim +350 drivers/cpuidle/cpuidle-riscv-sbi.c
317
318 static int sbi_cpuidle_init_cpu(struct device *dev, int cpu)
319 {
320 struct cpuidle_driver *drv;
321 unsigned int state_count = 0;
322 int ret = 0;
323
324 drv = devm_kzalloc(dev, sizeof(*drv), GFP_KERNEL);
325 if (!drv)
326 return -ENOMEM;
327
328 drv->name = "sbi_cpuidle";
329 drv->owner = THIS_MODULE;
330 drv->cpumask = (struct cpumask *)cpumask_of(cpu);
331
332 /* RISC-V architectural WFI to be represented as state index 0. */
333 drv->states[0].enter = sbi_cpuidle_enter_state;
334 drv->states[0].exit_latency = 1;
335 drv->states[0].target_residency = 1;
336 drv->states[0].power_usage = UINT_MAX;
337 strcpy(drv->states[0].name, "WFI");
338 strcpy(drv->states[0].desc, "RISC-V WFI");
339
340 /*
341 * If no DT idle states are detected (ret == 0) let the driver
342 * initialization fail accordingly since there is no reason to
343 * initialize the idle driver if only wfi is supported, the
344 * default archictectural back-end already executes wfi
345 * on idle entry.
346 */
347 ret = dt_init_idle_driver(drv, sbi_cpuidle_state_match, 1);
348 if (ret <= 0) {
349 pr_debug("HART%ld: failed to parse DT idle states\n",
> 350 cpuid_to_hartid_map(cpu));
351 return ret ? : -ENODEV;
352 }
353 state_count = ret + 1; /* Include WFI state as well */
354
355 /* Initialize idle states from DT. */
356 ret = sbi_cpuidle_dt_init_states(dev, drv, cpu, state_count);
357 if (ret) {
358 pr_err("HART%ld: failed to init idle states\n",
359 cpuid_to_hartid_map(cpu));
360 return ret;
361 }
362
363 ret = cpuidle_register(drv, NULL);
364 if (ret)
365 goto deinit;
366
367 cpuidle_cooling_register(drv);
368
369 return 0;
370 deinit:
371 sbi_cpuidle_deinit_cpu(cpu);
372 return ret;
373 }
374
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: drivers/cpuidle/cpuidle-riscv-sbi.c:350:5: warning: format specifies type 'long' but the argument has type 'int'
2022-04-16 3:09 drivers/cpuidle/cpuidle-riscv-sbi.c:350:5: warning: format specifies type 'long' but the argument has type 'int' kernel test robot
@ 2022-04-17 21:36 ` Randy Dunlap
0 siblings, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2022-04-17 21:36 UTC (permalink / raw)
To: kernel test robot, Anup Patel
Cc: llvm, kbuild-all, linux-kernel, Palmer Dabbelt
On 4/15/22 20:09, kernel test robot wrote:
> Hi Anup,
>
> FYI, the error/warning still remains.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 59250f8a7f3a60a2661b84cbafc1e0eb5d05ec9b
> commit: 6abf32f1d9c5009dcccded2c1e7ca899a4ab587b cpuidle: Add RISC-V SBI CPU idle driver
> date: 5 weeks ago
> config: riscv-randconfig-r026-20220416 (https://download.01.org/0day-ci/archive/20220416/202204161152.YXsVu0jD-lkp@intel.com/config)
> compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 8e43cbab33765c476337571e5ed11b005199dd0d)
> 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 riscv cross compiling tool for clang build
> # apt-get install binutils-riscv64-linux-gnu
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6abf32f1d9c5009dcccded2c1e7ca899a4ab587b
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout 6abf32f1d9c5009dcccded2c1e7ca899a4ab587b
> # save the config file to linux build tree
> mkdir build_dir
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/cpuidle/
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
Fixed here:
https://lore.kernel.org/linux-riscv/20220403031355.20894-1-rdunlap@infradead.org/
--
~Randy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: drivers/cpuidle/cpuidle-riscv-sbi.c:350:5: warning: format specifies type 'long' but the argument has type 'int'
@ 2022-04-17 21:36 ` Randy Dunlap
0 siblings, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2022-04-17 21:36 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1700 bytes --]
On 4/15/22 20:09, kernel test robot wrote:
> Hi Anup,
>
> FYI, the error/warning still remains.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 59250f8a7f3a60a2661b84cbafc1e0eb5d05ec9b
> commit: 6abf32f1d9c5009dcccded2c1e7ca899a4ab587b cpuidle: Add RISC-V SBI CPU idle driver
> date: 5 weeks ago
> config: riscv-randconfig-r026-20220416 (https://download.01.org/0day-ci/archive/20220416/202204161152.YXsVu0jD-lkp(a)intel.com/config)
> compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 8e43cbab33765c476337571e5ed11b005199dd0d)
> 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 riscv cross compiling tool for clang build
> # apt-get install binutils-riscv64-linux-gnu
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6abf32f1d9c5009dcccded2c1e7ca899a4ab587b
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout 6abf32f1d9c5009dcccded2c1e7ca899a4ab587b
> # save the config file to linux build tree
> mkdir build_dir
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/cpuidle/
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
Fixed here:
https://lore.kernel.org/linux-riscv/20220403031355.20894-1-rdunlap(a)infradead.org/
--
~Randy
^ permalink raw reply [flat|nested] 4+ messages in thread
* drivers/cpuidle/cpuidle-riscv-sbi.c:350:5: warning: format specifies type 'long' but the argument has type 'int'
@ 2022-04-02 20:36 kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-04-02 20:36 UTC (permalink / raw)
To: Anup Patel; +Cc: llvm, kbuild-all, linux-kernel, Palmer Dabbelt
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6f34f8c3d6178527d4c02aa3a53c370cc70cb91e
commit: 6abf32f1d9c5009dcccded2c1e7ca899a4ab587b cpuidle: Add RISC-V SBI CPU idle driver
date: 3 weeks ago
config: riscv-randconfig-c006-20220403 (https://download.01.org/0day-ci/archive/20220403/202204030457.TMq8L80S-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project c4a1b07d0979e7ff20d7d541af666d822d66b566)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6abf32f1d9c5009dcccded2c1e7ca899a4ab587b
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 6abf32f1d9c5009dcccded2c1e7ca899a4ab587b
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/cpuidle/
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/cpuidle/cpuidle-riscv-sbi.c:350:5: error: implicit declaration of function 'cpuid_to_hartid_map' [-Werror,-Wimplicit-function-declaration]
cpuid_to_hartid_map(cpu));
^
>> drivers/cpuidle/cpuidle-riscv-sbi.c:350:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat]
cpuid_to_hartid_map(cpu));
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:570:26: note: expanded from macro 'pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:163:22: note: expanded from macro 'dynamic_pr_debug'
pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:152:56: note: expanded from macro '_dynamic_func_call'
__dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/dynamic_debug.h:134:15: note: expanded from macro '__dynamic_func_call'
func(&id, ##__VA_ARGS__); \
^~~~~~~~~~~
drivers/cpuidle/cpuidle-riscv-sbi.c:359:10: error: implicit declaration of function 'cpuid_to_hartid_map' [-Werror,-Wimplicit-function-declaration]
cpuid_to_hartid_map(cpu));
^
drivers/cpuidle/cpuidle-riscv-sbi.c:359:10: warning: format specifies type 'long' but the argument has type 'int' [-Wformat]
cpuid_to_hartid_map(cpu));
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:489:33: note: expanded from macro 'pr_err'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:446:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
drivers/cpuidle/cpuidle-riscv-sbi.c:567:6: error: implicit declaration of function 'cpuid_to_hartid_map' [-Werror,-Wimplicit-function-declaration]
cpuid_to_hartid_map(cpu));
^
drivers/cpuidle/cpuidle-riscv-sbi.c:567:6: warning: format specifies type 'long' but the argument has type 'int' [-Wformat]
cpuid_to_hartid_map(cpu));
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:570:26: note: expanded from macro 'pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:163:22: note: expanded from macro 'dynamic_pr_debug'
pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:152:56: note: expanded from macro '_dynamic_func_call'
__dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/dynamic_debug.h:134:15: note: expanded from macro '__dynamic_func_call'
func(&id, ##__VA_ARGS__); \
^~~~~~~~~~~
3 warnings and 3 errors generated.
vim +350 drivers/cpuidle/cpuidle-riscv-sbi.c
317
318 static int sbi_cpuidle_init_cpu(struct device *dev, int cpu)
319 {
320 struct cpuidle_driver *drv;
321 unsigned int state_count = 0;
322 int ret = 0;
323
324 drv = devm_kzalloc(dev, sizeof(*drv), GFP_KERNEL);
325 if (!drv)
326 return -ENOMEM;
327
328 drv->name = "sbi_cpuidle";
329 drv->owner = THIS_MODULE;
330 drv->cpumask = (struct cpumask *)cpumask_of(cpu);
331
332 /* RISC-V architectural WFI to be represented as state index 0. */
333 drv->states[0].enter = sbi_cpuidle_enter_state;
334 drv->states[0].exit_latency = 1;
335 drv->states[0].target_residency = 1;
336 drv->states[0].power_usage = UINT_MAX;
337 strcpy(drv->states[0].name, "WFI");
338 strcpy(drv->states[0].desc, "RISC-V WFI");
339
340 /*
341 * If no DT idle states are detected (ret == 0) let the driver
342 * initialization fail accordingly since there is no reason to
343 * initialize the idle driver if only wfi is supported, the
344 * default archictectural back-end already executes wfi
345 * on idle entry.
346 */
347 ret = dt_init_idle_driver(drv, sbi_cpuidle_state_match, 1);
348 if (ret <= 0) {
349 pr_debug("HART%ld: failed to parse DT idle states\n",
> 350 cpuid_to_hartid_map(cpu));
351 return ret ? : -ENODEV;
352 }
353 state_count = ret + 1; /* Include WFI state as well */
354
355 /* Initialize idle states from DT. */
356 ret = sbi_cpuidle_dt_init_states(dev, drv, cpu, state_count);
357 if (ret) {
358 pr_err("HART%ld: failed to init idle states\n",
359 cpuid_to_hartid_map(cpu));
360 return ret;
361 }
362
363 ret = cpuidle_register(drv, NULL);
364 if (ret)
365 goto deinit;
366
367 cpuidle_cooling_register(drv);
368
369 return 0;
370 deinit:
371 sbi_cpuidle_deinit_cpu(cpu);
372 return ret;
373 }
374
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-04-17 21:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-16 3:09 drivers/cpuidle/cpuidle-riscv-sbi.c:350:5: warning: format specifies type 'long' but the argument has type 'int' kernel test robot
2022-04-17 21:36 ` Randy Dunlap
2022-04-17 21:36 ` Randy Dunlap
-- strict thread matches above, loose matches on Subject: below --
2022-04-02 20:36 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.