lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sat, 30 Jul 2022 22:33:15 +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/45]
 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:   9d220d614f299a3841990e7890aba88262b29012
commit: 3ab8ce4cbcd9f740c610e181649b1eb108bc7a05 [20/45] RISC-V: Treat IPIs as normal Linux IRQs
config: riscv-buildonly-randconfig-r003-20220729
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 52cd00cabf479aa7eb6dbb063b7ba41ea57bce9e)
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/3ab8ce4cbcd9f740c610e181649b1eb108bc7a05
        git remote add avpatel https://github.com/avpatel/linux.git
        git fetch --no-tags avpatel riscv_sbi_dbcn_v1
        git checkout 3ab8ce4cbcd9f740c610e181649b1eb108bc7a05
        # 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/

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

View attachment "config" of type "text/plain" (135334 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ