[rcu:dev.2021.08.03a 42/61] kernel/cpu.c:733:45: error: passing 'const char [19]' to parameter of type 'void *' discards qualifiers

From: kernel test robot
Date: Thu Aug 05 2021 - 16:25:15 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2021.08.03a
head: b7fafd4e7d0eb2a91d3b682d2618f7fad7e34b14
commit: ee466fedb5a3507f3b2a9ecd64dae0d004097220 [42/61] EXP cpu: Add yet more CPU-hotplug progress debugging code
config: hexagon-randconfig-r005-20210804 (attached as .config)
compiler: clang version 12.0.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git/commit/?id=ee466fedb5a3507f3b2a9ecd64dae0d004097220
git remote add rcu https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
git fetch --no-tags rcu dev.2021.08.03a
git checkout ee466fedb5a3507f3b2a9ecd64dae0d004097220
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=hexagon

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

All errors (new ones prefixed by >>):

kernel/cpu.c:135:6: error: redefinition of 'cpu_hp_start_now'
void cpu_hp_start_now(void)
^
include/linux/cpu.h:147:20: note: previous definition is here
static inline void cpu_hp_start_now(void) { }
^
kernel/cpu.c:144:6: error: redefinition of 'cpu_hp_stop_now'
void cpu_hp_stop_now(void)
^
include/linux/cpu.h:148:20: note: previous definition is here
static inline void cpu_hp_stop_now(void) { }
^
kernel/cpu.c:155:6: error: conflicting types for 'cpu_hp_check_delay'
void cpu_hp_check_delay(const char *s, const void *func)
^
include/linux/cpu.h:149:20: note: previous definition is here
static inline void cpu_hp_check_delay(const char *s, void *func) { }
^
>> kernel/cpu.c:733:45: error: passing 'const char [19]' to parameter of type 'void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
cpu_hp_check_delay("CPU-hotplug notifier", __func__);
^~~~~~~~
include/linux/cpu.h:149:60: note: passing argument to parameter 'func' here
static inline void cpu_hp_check_delay(const char *s, void *func) { }
^
4 errors generated.


vim +733 kernel/cpu.c

719
720 static int cpuhp_up_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st,
721 enum cpuhp_state target)
722 {
723 enum cpuhp_state prev_state = st->state;
724 int ret = 0;
725
726 ret = cpuhp_invoke_callback_range(true, cpu, st, target);
727 if (ret) {
728 cpuhp_reset_state(st, prev_state);
729 if (can_rollback_cpu(st))
730 WARN_ON(cpuhp_invoke_callback_range(false, cpu, st,
731 prev_state));
732 }
> 733 cpu_hp_check_delay("CPU-hotplug notifier", __func__);
734 return ret;
735 }
736

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

Attachment: .config.gz
Description: application/gzip