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] [thread-next>] [day] [month] [year] [list]
Message-ID: <202301060047.MIcDVwKC-lkp@intel.com>
Date:   Fri, 6 Jan 2023 10:11:35 +0300
From:   Dan Carpenter <error27@...il.com>
To:     oe-kbuild@...ts.linux.dev, Jiri Valek - 2N <jiriv@...s.com>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Krzysztof Kozlowski <krzk@...nel.org>
Cc:     lkp@...el.com, oe-kbuild-all@...ts.linux.dev,
        Jiri Valek - 2N <jiriv@...s.com>,
        Rob Herring <robh+dt@...nel.org>,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>,
        "open list:INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN)..." 
        <linux-input@...r.kernel.org>,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] Input: cap11xx - add support for cap1203, cap1293
 and cap1298

Hi Jiri,

https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Jiri-Valek-2N/dt-bindings-input-microchip-cap11xx-add-cap1203-cap1293-and-cap1298/20230103-214328
base:   https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
patch link:    https://lore.kernel.org/r/20230103134105.736346-3-jiriv%40axis.com
patch subject: [PATCH 2/2] Input: cap11xx - add support for cap1203, cap1293 and cap1298
config: loongarch-randconfig-m031-20230101
compiler: loongarch64-linux-gcc (GCC) 12.1.0

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
| Reported-by: Dan Carpenter <error27@...il.com>

smatch warnings:
drivers/input/keyboard/cap11xx.c:400 cap11xx_i2c_probe() warn: was && intended here instead of ||?

vim +400 drivers/input/keyboard/cap11xx.c

c77fd0a42b24ac Matt Ranostay    2014-10-31  390  	if (!of_property_read_u32(node, "microchip,sensor-gain", &gain32)) {
322a552e195508 Jesse Taube      2021-11-02  391  		if (cap->no_gain)
322a552e195508 Jesse Taube      2021-11-02  392  			dev_warn(dev,
322a552e195508 Jesse Taube      2021-11-02  393  				 "This version doesn't support sensor gain\n");
322a552e195508 Jesse Taube      2021-11-02  394  		else if (is_power_of_2(gain32) && gain32 <= 8)
c77fd0a42b24ac Matt Ranostay    2014-10-31  395  			gain = ilog2(gain32);
c77fd0a42b24ac Matt Ranostay    2014-10-31  396  		else
c77fd0a42b24ac Matt Ranostay    2014-10-31  397  			dev_err(dev, "Invalid sensor-gain value %d\n", gain32);
c77fd0a42b24ac Matt Ranostay    2014-10-31  398  	}
c77fd0a42b24ac Matt Ranostay    2014-10-31  399  
e3f771deec5bca Jiri Valek - 2N  2023-01-03 @400  	if ((id->driver_data != CAP1206) ||
e3f771deec5bca Jiri Valek - 2N  2023-01-03  401  		(id->driver_data != CAP1203) ||
e3f771deec5bca Jiri Valek - 2N  2023-01-03  402  		(id->driver_data != CAP1293) ||
e3f771deec5bca Jiri Valek - 2N  2023-01-03  403  		(id->driver_data != CAP1298)) {

Yep.  && isntead of ||.  ->driver_data can't be equal to *all* of
those at the same time.

6bdd2fd1ed6f66 Matt Ranostay    2014-10-31  404  		if (of_property_read_bool(node, "microchip,irq-active-high")) {
322a552e195508 Jesse Taube      2021-11-02  405  			error = regmap_update_bits(priv->regmap,
322a552e195508 Jesse Taube      2021-11-02  406  						   CAP11XX_REG_CONFIG2,
322a552e195508 Jesse Taube      2021-11-02  407  						   CAP11XX_REG_CONFIG2_ALT_POL,
322a552e195508 Jesse Taube      2021-11-02  408  						   0);
6bdd2fd1ed6f66 Matt Ranostay    2014-10-31  409  			if (error)
6bdd2fd1ed6f66 Matt Ranostay    2014-10-31  410  				return error;
6bdd2fd1ed6f66 Matt Ranostay    2014-10-31  411  		}
322a552e195508 Jesse Taube      2021-11-02  412  	}
6bdd2fd1ed6f66 Matt Ranostay    2014-10-31  413  
c77fd0a42b24ac Matt Ranostay    2014-10-31  414  	/* Provide some useful defaults */
7609a5e973c43a Matt Ranostay    2014-10-31  415  	for (i = 0; i < cap->num_channels; i++)

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ