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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 6 Nov 2023 20:07:00 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     kernel test robot <lkp@...el.com>, Peter Rosin <peda@...ntia.se>
Cc:     Chris Packham <chris.packham@...iedtelesis.co.nz>,
        oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Mark Brown <broonie@...nel.org>
Subject: Re: drivers/mux/adg792a.c:134:34: warning: 'adg792a_of_match' defined
 but not used

(Resend to all)

On Sun, Nov 5, 2023 at 7:03 AM kernel test robot <lkp@...el.com> wrote:
>
> Hi Chris,
>
> First bad commit (maybe != root cause):

Indeed.

>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   aea6bf908d730b01bd264a8821159db9463c111c
> commit: e9e40543ad5b38b848879768359fd13650529961 spi: Add generic SPI multiplexer
> date:   3 years, 9 months ago
> config: i386-randconfig-004-20231101 (https://download.01.org/0day-ci/archive/20231105/202311051347.7J6bthD7-lkp@intel.com/config)
> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231105/202311051347.7J6bthD7-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@...el.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202311051347.7J6bthD7-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
> >> drivers/mux/adg792a.c:134:34: warning: 'adg792a_of_match' defined but not used [-Wunused-const-variable=]
>      134 | static const struct of_device_id adg792a_of_match[] = {
>          |                                  ^~~~~~~~~~~~~~~~
>

I dunno why it's pointing out to that commit and some (random?) people
in Cc list, but the real problem there from day 1, i.e. (ab)using
of_match_ptr(). The of_match_ptr() should not ever be used. It appears
more harmful than useful.

Hence the proper fix is to drop of_match_ptr() in this file.


> vim +/adg792a_of_match +134 drivers/mux/adg792a.c

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ