[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202207242327.0xOXKUOG-lkp@intel.com>
Date: Sun, 24 Jul 2022 23:08:26 +0800
From: kernel test robot <lkp@...el.com>
To: Anup Patel <apatel@...tanamicro.com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org
Subject: [avpatel:riscv_sbi_dbcn_v1 20/44]
drivers/clocksource/timer-clint.c:250:31: error: too few arguments to
function call, expected 2, have 1
tree: https://github.com/avpatel/linux.git riscv_sbi_dbcn_v1
head: 1b3aaa127f01dc1a35b6595c628a38b92832488d
commit: 5cbf32460e4d1f3876930e54e0b4599310c84ea4 [20/44] RISC-V: Treat IPIs as normal Linux IRQs
config: riscv-nommu_virt_defconfig (https://download.01.org/0day-ci/archive/20220724/202207242327.0xOXKUOG-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 12fbd2d377e396ad61bce56d71c98a1eb1bebfa9)
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://github.com/avpatel/linux/commit/5cbf32460e4d1f3876930e54e0b4599310c84ea4
git remote add avpatel https://github.com/avpatel/linux.git
git fetch --no-tags avpatel riscv_sbi_dbcn_v1
git checkout 5cbf32460e4d1f3876930e54e0b4599310c84ea4
# 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=riscv SHELL=/bin/bash drivers/clocksource/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
In file included from drivers/clocksource/timer-clint.c:11:
In file included from include/linux/clocksource.h:22:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from drivers/clocksource/timer-clint.c:11:
In file included from include/linux/clocksource.h:22:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from drivers/clocksource/timer-clint.c:11:
In file included from include/linux/clocksource.h:22:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:1024:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
>> drivers/clocksource/timer-clint.c:250:31: error: too few arguments to function call, expected 2, have 1
clint_clear_ipi(clint_ipi_irq);
~~~~~~~~~~~~~~~ ^
drivers/clocksource/timer-clint.c:56:13: note: 'clint_clear_ipi' declared here
static void clint_clear_ipi(unsigned int parent_virq, void *data)
^
7 warnings and 1 error generated.
vim +250 drivers/clocksource/timer-clint.c
214
215 pr_info("%pOFP: timer running at %ld Hz\n", np, clint_timer_freq);
216
217 rc = clocksource_register_hz(&clint_clocksource, clint_timer_freq);
218 if (rc) {
219 pr_err("%pOFP: clocksource register failed [%d]\n", np, rc);
220 goto fail_iounmap;
221 }
222
223 sched_clock_register(clint_get_cycles64, 64, clint_timer_freq);
224
225 rc = request_percpu_irq(clint_timer_irq, clint_timer_interrupt,
226 "clint-timer", &clint_clock_event);
227 if (rc) {
228 pr_err("registering percpu irq failed [%d]\n", rc);
229 goto fail_iounmap;
230 }
231
232 rc = cpuhp_setup_state(CPUHP_AP_CLINT_TIMER_STARTING,
233 "clockevents/clint/timer:starting",
234 clint_timer_starting_cpu,
235 clint_timer_dying_cpu);
236 if (rc) {
237 pr_err("%pOFP: cpuhp setup state failed [%d]\n", np, rc);
238 goto fail_free_irq;
239 }
240
241 virq = ipi_mux_create(clint_ipi_irq, BITS_PER_BYTE,
242 &clint_ipi_ops, NULL);
243 if (virq <= 0) {
244 pr_err("unable to create muxed IPIs\n");
245 rc = (virq < 0) ? virq : -ENODEV;
246 goto fail_remove_cpuhp;
247 }
248
249 riscv_ipi_set_virq_range(virq, BITS_PER_BYTE);
> 250 clint_clear_ipi(clint_ipi_irq);
251
252 return 0;
253
254 fail_remove_cpuhp:
255 cpuhp_remove_state(CPUHP_AP_CLINT_TIMER_STARTING);
256 fail_free_irq:
257 free_irq(clint_timer_irq, &clint_clock_event);
258 fail_iounmap:
259 iounmap(base);
260 return rc;
261 }
262
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists