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]
Date:   Tue, 20 Dec 2022 21:03:04 +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:     llvm@...ts.linux.dev, 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/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-a013-20221219
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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
        # 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
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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:289:18: error: implicit declaration of function 'dev_pinctrl' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   bri->pinctrl = dev_pinctrl(dev->parent);
                                  ^
>> drivers/i2c/i2c-core-base.c:289:16: warning: incompatible integer to pointer conversion assigning to 'struct pinctrl *' from 'int' [-Wint-conversion]
                   bri->pinctrl = dev_pinctrl(dev->parent);
                                ^ ~~~~~~~~~~~~~~~~~~~~~~~~
   1 warning and 1 error generated.


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" (155356 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ