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>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 8 Jun 2020 20:07:29 +0800
From:   Baolin Wang <baolin.wang7@...il.com>
To:     kernel test robot <lkp@...el.com>
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        LKML <linux-kernel@...r.kernel.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>
Subject: Re: drivers/hwspinlock/sirf_hwspinlock.c:87:34: warning: unused
 variable 'sirf_hwpinlock_ids'

On Mon, Jun 8, 2020 at 2:38 AM kernel test robot <lkp@...el.com> wrote:
>
> Hi Baolin,
>
> First bad commit (maybe != root cause):
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   3b69e8b4571125bec1f77f886174fe6cab6b9d75
> commit: ffd0bbfb378ecd56eac22bf932ccdbf89ac7f725 hwspinlock: Allow drivers to be built with COMPILE_TEST
> date:   2 months ago
> config: arm-randconfig-r001-20200607 (attached as .config)
> compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project e429cffd4f228f70c1d9df0e5d77c08590dd9766)
> 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 arm cross compiling tool for clang build
>         # apt-get install binutils-arm-linux-gnueabi
>         git checkout ffd0bbfb378ecd56eac22bf932ccdbf89ac7f725
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@...el.com>
>
> All warnings (new ones prefixed by >>, old ones prefixed by <<):
>
> >> drivers/hwspinlock/sirf_hwspinlock.c:87:34: warning: unused variable 'sirf_hwpinlock_ids' [-Wunused-const-variable]
> static const struct of_device_id sirf_hwpinlock_ids[] = {

In your testing configuration, the CONFIG_OF is not select, so the
macro 'of_match_ptr' becomes NULL, which triggers this waring. I think
we can remove the redundant "of_match_ptr" to fix this warning. Thanks
for your report.

> ^
> 1 warning generated.
>
> vim +/sirf_hwpinlock_ids +87 drivers/hwspinlock/sirf_hwspinlock.c
>
> cc16d664e21ef6 Wei Chen 2015-05-26  86
> cc16d664e21ef6 Wei Chen 2015-05-26 @87  static const struct of_device_id sirf_hwpinlock_ids[] = {
> cc16d664e21ef6 Wei Chen 2015-05-26  88          { .compatible = "sirf,hwspinlock", },
> cc16d664e21ef6 Wei Chen 2015-05-26  89          {},
> cc16d664e21ef6 Wei Chen 2015-05-26  90  };
> cc16d664e21ef6 Wei Chen 2015-05-26  91  MODULE_DEVICE_TABLE(of, sirf_hwpinlock_ids);
> cc16d664e21ef6 Wei Chen 2015-05-26  92
>
> :::::: The code at line 87 was first introduced by commit
> :::::: cc16d664e21ef640faaf51e9952384cf90b92d9f hwspinlock: add a CSR atlas7 driver
>
> :::::: TO: Wei Chen <wei.chen@....com>
> :::::: CC: Ohad Ben-Cohen <ohad@...ery.com>
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org



-- 
Baolin Wang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ