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: <202212201416.K2pP3tbL-lkp@intel.com>
Date:   Tue, 20 Dec 2022 14:43:51 +0800
From:   kernel test robot <lkp@...el.com>
To:     Hanna Hawa <hhhawa@...zon.com>, wsa@...nel.org,
        linus.walleij@...aro.org, andriy.shevchenko@...ux.intel.com,
        linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-gpio@...r.kernel.org
Cc:     oe-kbuild-all@...ts.linux.dev, dwmw@...zon.co.uk, benh@...zon.com,
        ronenk@...zon.com, talel@...zon.com, jonnyc@...zon.com,
        hanochu@...zon.com, farbere@...zon.com, itamark@...zon.com,
        hhhawa@...zon.com
Subject: Re: [PATCH v3 1/1] i2c: Set pinctrl recovery info to device pinctrl

Hi Hanna,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on wsa/i2c/for-next]
[also build test WARNING on linusw-pinctrl/devel linusw-pinctrl/for-next linus/master v6.1 next-20221220]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Hanna-Hawa/i2c-Set-pinctrl-recovery-info-to-device-pinctrl/20221220-034335
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
patch link:    https://lore.kernel.org/r/20221219193228.35078-1-hhhawa%40amazon.com
patch subject: [PATCH v3 1/1] i2c: Set pinctrl recovery info to device pinctrl
config: x86_64-randconfig-a002-20221219
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/a0e0c7c95aa46232edade3d28e0df8d133eb976b
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Hanna-Hawa/i2c-Set-pinctrl-recovery-info-to-device-pinctrl/20221220-034335
        git checkout a0e0c7c95aa46232edade3d28e0df8d133eb976b
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 olddefconfig
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/i2c/

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

All warnings (new ones prefixed by >>):

   drivers/i2c/i2c-core-base.c: In function 'i2c_gpio_init_pinctrl_recovery':
   drivers/i2c/i2c-core-base.c:289:32: error: implicit declaration of function 'dev_pinctrl'; did you mean 'devm_pinctrl_put'? [-Werror=implicit-function-declaration]
     289 |                 bri->pinctrl = dev_pinctrl(dev->parent);
         |                                ^~~~~~~~~~~
         |                                devm_pinctrl_put
>> drivers/i2c/i2c-core-base.c:289:30: warning: assignment to 'struct pinctrl *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     289 |                 bri->pinctrl = dev_pinctrl(dev->parent);
         |                              ^
   cc1: some warnings being treated as errors


vim +289 drivers/i2c/i2c-core-base.c

   281	
   282	static void i2c_gpio_init_pinctrl_recovery(struct i2c_adapter *adap)
   283	{
   284		struct i2c_bus_recovery_info *bri = adap->bus_recovery_info;
   285		struct device *dev = &adap->dev;
   286		struct pinctrl *p;
   287	
   288		if (!bri->pinctrl)
 > 289			bri->pinctrl = dev_pinctrl(dev->parent);
   290		p = bri->pinctrl;
   291	
   292		/*
   293		 * we can't change states without pinctrl, so remove the states if
   294		 * populated
   295		 */
   296		if (!p) {
   297			bri->pins_default = NULL;
   298			bri->pins_gpio = NULL;
   299			return;
   300		}
   301	
   302		if (!bri->pins_default) {
   303			bri->pins_default = pinctrl_lookup_state(p,
   304								 PINCTRL_STATE_DEFAULT);
   305			if (IS_ERR(bri->pins_default)) {
   306				dev_dbg(dev, PINCTRL_STATE_DEFAULT " state not found for GPIO recovery\n");
   307				bri->pins_default = NULL;
   308			}
   309		}
   310		if (!bri->pins_gpio) {
   311			bri->pins_gpio = pinctrl_lookup_state(p, "gpio");
   312			if (IS_ERR(bri->pins_gpio))
   313				bri->pins_gpio = pinctrl_lookup_state(p, "recovery");
   314	
   315			if (IS_ERR(bri->pins_gpio)) {
   316				dev_dbg(dev, "no gpio or recovery state found for GPIO recovery\n");
   317				bri->pins_gpio = NULL;
   318			}
   319		}
   320	
   321		/* for pinctrl state changes, we need all the information */
   322		if (bri->pins_default && bri->pins_gpio) {
   323			dev_info(dev, "using pinctrl states for GPIO recovery");
   324		} else {
   325			bri->pinctrl = NULL;
   326			bri->pins_default = NULL;
   327			bri->pins_gpio = NULL;
   328		}
   329	}
   330	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ