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: <202210072120.KuAQAgpm-lkp@intel.com>
Date:   Fri, 7 Oct 2022 21:33:08 +0800
From:   kernel test robot <lkp@...el.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Basavaraj Natikar <Basavaraj.Natikar@....com>,
        linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     kbuild-all@...ts.01.org, Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [rft, PATCH v1 1/1] pinctrl: Clean up headers

Hi Andy,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linusw-pinctrl/devel]
[also build test WARNING on linus/master v6.0 next-20221007]
[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/Andy-Shevchenko/pinctrl-Clean-up-headers/20221007-183311
base:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
config: arm-defconfig
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
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/5b392edeea764a64953fbab65c9a06b2745ebdd7
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Andy-Shevchenko/pinctrl-Clean-up-headers/20221007-183311
        git checkout 5b392edeea764a64953fbab65c9a06b2745ebdd7
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/pinctrl/

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/pinctrl/pinctrl-st.c: In function 'st_gpio_direction_input':
   drivers/pinctrl/pinctrl-st.c:717:9: error: implicit declaration of function 'pinctrl_gpio_direction_input'; did you mean 'st_gpio_direction_input'? [-Werror=implicit-function-declaration]
     717 |         pinctrl_gpio_direction_input(chip->base + offset);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |         st_gpio_direction_input
   drivers/pinctrl/pinctrl-st.c: In function 'st_gpio_direction_output':
   drivers/pinctrl/pinctrl-st.c:728:9: error: implicit declaration of function 'pinctrl_gpio_direction_output'; did you mean 'st_gpio_direction_output'? [-Werror=implicit-function-declaration]
     728 |         pinctrl_gpio_direction_output(chip->base + offset);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |         st_gpio_direction_output
   drivers/pinctrl/pinctrl-st.c: In function 'st_pinconf_dbg_show':
   drivers/pinctrl/pinctrl-st.c:1016:9: error: implicit declaration of function 'seq_printf'; did you mean 'bstr_printf'? [-Werror=implicit-function-declaration]
    1016 |         seq_printf(s, "[OE:%d,PU:%ld,OD:%ld]\t%s\n"
         |         ^~~~~~~~~~
         |         bstr_printf
   drivers/pinctrl/pinctrl-st.c: In function 'st_pctl_probe_dt':
   drivers/pinctrl/pinctrl-st.c:1664:37: error: implicit declaration of function 'devm_kasprintf_strarray' [-Werror=implicit-function-declaration]
    1664 |                         pin_names = devm_kasprintf_strarray(dev, bank_name, ST_GPIO_PINS_PER_BANK);
         |                                     ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/pinctrl/pinctrl-st.c:1664:35: warning: assignment to 'char **' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1664 |                         pin_names = devm_kasprintf_strarray(dev, bank_name, ST_GPIO_PINS_PER_BANK);
         |                                   ^
   cc1: some warnings being treated as errors


vim +1664 drivers/pinctrl/pinctrl-st.c

701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1596  
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1597  static int st_pctl_probe_dt(struct platform_device *pdev,
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1598  	struct pinctrl_desc *pctl_desc, struct st_pinctrl *info)
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1599  {
f972707662dbaf Andy Shevchenko     2021-11-05  1600  	struct device *dev = &pdev->dev;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1601  	int ret = 0;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1602  	int i = 0, j = 0, k = 0, bank;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1603  	struct pinctrl_pin_desc *pdesc;
f972707662dbaf Andy Shevchenko     2021-11-05  1604  	struct device_node *np = dev->of_node;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1605  	struct device_node *child;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1606  	int grp_index = 0;
727b0f71a56de6 Srinivas Kandagatla 2014-01-16  1607  	int irq = 0;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1608  
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1609  	st_pctl_dt_child_count(info, np);
3d4d3e0a7d67a9 Andy Shevchenko     2021-11-05  1610  	if (!info->nbanks)
3d4d3e0a7d67a9 Andy Shevchenko     2021-11-05  1611  		return dev_err_probe(dev, -EINVAL, "you need at least one gpio bank\n");
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1612  
f972707662dbaf Andy Shevchenko     2021-11-05  1613  	dev_info(dev, "nbanks = %d\n", info->nbanks);
f972707662dbaf Andy Shevchenko     2021-11-05  1614  	dev_info(dev, "nfunctions = %d\n", info->nfunctions);
f972707662dbaf Andy Shevchenko     2021-11-05  1615  	dev_info(dev, "ngroups = %d\n", info->ngroups);
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1616  
f972707662dbaf Andy Shevchenko     2021-11-05  1617  	info->functions = devm_kcalloc(dev, info->nfunctions, sizeof(*info->functions), GFP_KERNEL);
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1618  
f972707662dbaf Andy Shevchenko     2021-11-05  1619  	info->groups = devm_kcalloc(dev, info->ngroups, sizeof(*info->groups), GFP_KERNEL);
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1620  
f972707662dbaf Andy Shevchenko     2021-11-05  1621  	info->banks = devm_kcalloc(dev, info->nbanks, sizeof(*info->banks), GFP_KERNEL);
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1622  
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1623  	if (!info->functions || !info->groups || !info->banks)
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1624  		return -ENOMEM;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1625  
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1626  	info->regmap = syscon_regmap_lookup_by_phandle(np, "st,syscfg");
3d4d3e0a7d67a9 Andy Shevchenko     2021-11-05  1627  	if (IS_ERR(info->regmap))
3d4d3e0a7d67a9 Andy Shevchenko     2021-11-05  1628  		return dev_err_probe(dev, PTR_ERR(info->regmap), "No syscfg phandle specified\n");
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1629  	info->data = of_match_node(st_pctl_of_match, np)->data;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1630  
727b0f71a56de6 Srinivas Kandagatla 2014-01-16  1631  	irq = platform_get_irq(pdev, 0);
727b0f71a56de6 Srinivas Kandagatla 2014-01-16  1632  
727b0f71a56de6 Srinivas Kandagatla 2014-01-16  1633  	if (irq > 0) {
3809671d95a1c4 Andy Shevchenko     2021-11-05  1634  		info->irqmux_base = devm_platform_ioremap_resource_byname(pdev, "irqmux");
727b0f71a56de6 Srinivas Kandagatla 2014-01-16  1635  		if (IS_ERR(info->irqmux_base))
727b0f71a56de6 Srinivas Kandagatla 2014-01-16  1636  			return PTR_ERR(info->irqmux_base);
727b0f71a56de6 Srinivas Kandagatla 2014-01-16  1637  
1b11b0cb799e5f Thomas Gleixner     2015-06-21  1638  		irq_set_chained_handler_and_data(irq, st_gpio_irqmux_handler,
1b11b0cb799e5f Thomas Gleixner     2015-06-21  1639  						 info);
727b0f71a56de6 Srinivas Kandagatla 2014-01-16  1640  	}
727b0f71a56de6 Srinivas Kandagatla 2014-01-16  1641  
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1642  	pctl_desc->npins = info->nbanks * ST_GPIO_PINS_PER_BANK;
f972707662dbaf Andy Shevchenko     2021-11-05  1643  	pdesc =	devm_kcalloc(dev, pctl_desc->npins, sizeof(*pdesc), GFP_KERNEL);
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1644  	if (!pdesc)
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1645  		return -ENOMEM;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1646  
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1647  	pctl_desc->pins = pdesc;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1648  
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1649  	bank = 0;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1650  	for_each_child_of_node(np, child) {
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1651  		if (of_property_read_bool(child, "gpio-controller")) {
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1652  			const char *bank_name = NULL;
3956d6c85f26b5 Andy Shevchenko     2021-11-05  1653  			char **pin_names;
3956d6c85f26b5 Andy Shevchenko     2021-11-05  1654  
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1655  			ret = st_gpiolib_register_bank(info, bank, child);
19d17d935b29f3 Nishka Dasgupta     2019-08-15  1656  			if (ret) {
19d17d935b29f3 Nishka Dasgupta     2019-08-15  1657  				of_node_put(child);
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1658  				return ret;
19d17d935b29f3 Nishka Dasgupta     2019-08-15  1659  			}
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1660  
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1661  			k = info->banks[bank].range.pin_base;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1662  			bank_name = info->banks[bank].range.name;
3956d6c85f26b5 Andy Shevchenko     2021-11-05  1663  
3956d6c85f26b5 Andy Shevchenko     2021-11-05 @1664  			pin_names = devm_kasprintf_strarray(dev, bank_name, ST_GPIO_PINS_PER_BANK);
3956d6c85f26b5 Andy Shevchenko     2021-11-05  1665  			if (IS_ERR(pin_names)) {
3956d6c85f26b5 Andy Shevchenko     2021-11-05  1666  				of_node_put(child);
3956d6c85f26b5 Andy Shevchenko     2021-11-05  1667  				return PTR_ERR(pin_names);
3956d6c85f26b5 Andy Shevchenko     2021-11-05  1668  			}
3956d6c85f26b5 Andy Shevchenko     2021-11-05  1669  
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1670  			for (j = 0; j < ST_GPIO_PINS_PER_BANK; j++, k++) {
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1671  				pdesc->number = k;
3956d6c85f26b5 Andy Shevchenko     2021-11-05  1672  				pdesc->name = pin_names[j];
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1673  				pdesc++;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1674  			}
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1675  			st_parse_syscfgs(info, bank, child);
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1676  			bank++;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1677  		} else {
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1678  			ret = st_pctl_parse_functions(child, info,
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1679  							i++, &grp_index);
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1680  			if (ret) {
f972707662dbaf Andy Shevchenko     2021-11-05  1681  				dev_err(dev, "No functions found.\n");
19d17d935b29f3 Nishka Dasgupta     2019-08-15  1682  				of_node_put(child);
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1683  				return ret;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1684  			}
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1685  		}
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1686  	}
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1687  
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1688  	return 0;
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1689  }
701016c0cba594 Srinivas KANDAGATLA 2013-06-20  1690  

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ