[PATCH 03/13] pinctrl: rockchip: make driver be tristate module

kernel test robot lkp at intel.com
Sat Jul 18 19:32:35 EDT 2020


Hi Jianqun,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on rockchip/for-next]
[also build test ERROR on pinctrl/devel v5.8-rc5 next-20200717]
[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]

url:    https://github.com/0day-ci/linux/commits/Jianqun-Xu/pinctrl-rockchip-prepare-work-for-split-driver/20200717-112906
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git for-next
config: alpha-randconfig-r014-20200719 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

   drivers/pinctrl/pinctrl-rockchip.c: In function 'rockchip_pinctrl_parse_groups':
>> drivers/pinctrl/pinctrl-rockchip.c:2879:9: error: implicit declaration of function 'pinconf_generic_parse_dt_config'; did you mean 'pinconf_generic_dump_config'? [-Werror=implicit-function-declaration]
    2879 |   ret = pinconf_generic_parse_dt_config(np_config, NULL,
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |         pinconf_generic_dump_config
   drivers/pinctrl/pinctrl-rockchip.c: In function 'rockchip_gpiolib_register':
>> drivers/pinctrl/pinctrl-rockchip.c:3471:5: error: 'struct gpio_chip' has no member named 'of_node'
    3471 |   gc->of_node = bank->of_node;
         |     ^~
   drivers/pinctrl/pinctrl-rockchip.c: In function 'rockchip_pinctrl_get_soc_data':
   drivers/pinctrl/pinctrl-rockchip.c:3575:8: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
    3575 |  const const struct rockchip_pin_ctrl *ctrl;
         |        ^~~~~
   drivers/pinctrl/pinctrl-rockchip.c: In function 'rockchip_pinctrl_probe':
   drivers/pinctrl/pinctrl-rockchip.c:3753:8: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
    3753 |  const const struct rockchip_pin_ctrl *ctrl;
         |        ^~~~~
   At top level:
   drivers/pinctrl/pinctrl-rockchip.c:2802:34: warning: 'rockchip_bank_match' defined but not used [-Wunused-const-variable=]
    2802 | static const struct of_device_id rockchip_bank_match[] = {
         |                                  ^~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +2879 drivers/pinctrl/pinctrl-rockchip.c

d3e5116119bd02 Heiko Stübner   2013-06-10  2821  
d3e5116119bd02 Heiko Stübner   2013-06-10  2822  static int rockchip_pinctrl_parse_groups(struct device_node *np,
d3e5116119bd02 Heiko Stübner   2013-06-10  2823  					      struct rockchip_pin_group *grp,
d3e5116119bd02 Heiko Stübner   2013-06-10  2824  					      struct rockchip_pinctrl *info,
d3e5116119bd02 Heiko Stübner   2013-06-10  2825  					      u32 index)
d3e5116119bd02 Heiko Stübner   2013-06-10  2826  {
d3e5116119bd02 Heiko Stübner   2013-06-10  2827  	struct rockchip_pin_bank *bank;
d3e5116119bd02 Heiko Stübner   2013-06-10  2828  	int size;
d3e5116119bd02 Heiko Stübner   2013-06-10  2829  	const __be32 *list;
d3e5116119bd02 Heiko Stübner   2013-06-10  2830  	int num;
d3e5116119bd02 Heiko Stübner   2013-06-10  2831  	int i, j;
d3e5116119bd02 Heiko Stübner   2013-06-10  2832  	int ret;
d3e5116119bd02 Heiko Stübner   2013-06-10  2833  
94f4e54cecaf3e Rob Herring     2018-08-27  2834  	dev_dbg(info->dev, "group(%d): %pOFn\n", index, np);
d3e5116119bd02 Heiko Stübner   2013-06-10  2835  
d3e5116119bd02 Heiko Stübner   2013-06-10  2836  	/* Initialise group */
d3e5116119bd02 Heiko Stübner   2013-06-10  2837  	grp->name = np->name;
d3e5116119bd02 Heiko Stübner   2013-06-10  2838  
d3e5116119bd02 Heiko Stübner   2013-06-10  2839  	/*
d3e5116119bd02 Heiko Stübner   2013-06-10  2840  	 * the binding format is rockchip,pins = <bank pin mux CONFIG>,
d3e5116119bd02 Heiko Stübner   2013-06-10  2841  	 * do sanity check and calculate pins number
d3e5116119bd02 Heiko Stübner   2013-06-10  2842  	 */
d3e5116119bd02 Heiko Stübner   2013-06-10  2843  	list = of_get_property(np, "rockchip,pins", &size);
d3e5116119bd02 Heiko Stübner   2013-06-10  2844  	/* we do not check return since it's safe node passed down */
d3e5116119bd02 Heiko Stübner   2013-06-10  2845  	size /= sizeof(*list);
d3e5116119bd02 Heiko Stübner   2013-06-10  2846  	if (!size || size % 4) {
d3e5116119bd02 Heiko Stübner   2013-06-10  2847  		dev_err(info->dev, "wrong pins number or pins and configs should be by 4\n");
d3e5116119bd02 Heiko Stübner   2013-06-10  2848  		return -EINVAL;
d3e5116119bd02 Heiko Stübner   2013-06-10  2849  	}
d3e5116119bd02 Heiko Stübner   2013-06-10  2850  
d3e5116119bd02 Heiko Stübner   2013-06-10  2851  	grp->npins = size / 4;
d3e5116119bd02 Heiko Stübner   2013-06-10  2852  
a86854d0c599b3 Kees Cook       2018-06-12  2853  	grp->pins = devm_kcalloc(info->dev, grp->npins, sizeof(unsigned int),
d3e5116119bd02 Heiko Stübner   2013-06-10  2854  						GFP_KERNEL);
a86854d0c599b3 Kees Cook       2018-06-12  2855  	grp->data = devm_kcalloc(info->dev,
a86854d0c599b3 Kees Cook       2018-06-12  2856  					grp->npins,
d3e5116119bd02 Heiko Stübner   2013-06-10  2857  					sizeof(struct rockchip_pin_config),
d3e5116119bd02 Heiko Stübner   2013-06-10  2858  					GFP_KERNEL);
d3e5116119bd02 Heiko Stübner   2013-06-10  2859  	if (!grp->pins || !grp->data)
d3e5116119bd02 Heiko Stübner   2013-06-10  2860  		return -ENOMEM;
d3e5116119bd02 Heiko Stübner   2013-06-10  2861  
d3e5116119bd02 Heiko Stübner   2013-06-10  2862  	for (i = 0, j = 0; i < size; i += 4, j++) {
d3e5116119bd02 Heiko Stübner   2013-06-10  2863  		const __be32 *phandle;
d3e5116119bd02 Heiko Stübner   2013-06-10  2864  		struct device_node *np_config;
d3e5116119bd02 Heiko Stübner   2013-06-10  2865  
d3e5116119bd02 Heiko Stübner   2013-06-10  2866  		num = be32_to_cpu(*list++);
d3e5116119bd02 Heiko Stübner   2013-06-10  2867  		bank = bank_num_to_bank(info, num);
d3e5116119bd02 Heiko Stübner   2013-06-10  2868  		if (IS_ERR(bank))
d3e5116119bd02 Heiko Stübner   2013-06-10  2869  			return PTR_ERR(bank);
d3e5116119bd02 Heiko Stübner   2013-06-10  2870  
d3e5116119bd02 Heiko Stübner   2013-06-10  2871  		grp->pins[j] = bank->pin_base + be32_to_cpu(*list++);
d3e5116119bd02 Heiko Stübner   2013-06-10  2872  		grp->data[j].func = be32_to_cpu(*list++);
d3e5116119bd02 Heiko Stübner   2013-06-10  2873  
d3e5116119bd02 Heiko Stübner   2013-06-10  2874  		phandle = list++;
d3e5116119bd02 Heiko Stübner   2013-06-10  2875  		if (!phandle)
d3e5116119bd02 Heiko Stübner   2013-06-10  2876  			return -EINVAL;
d3e5116119bd02 Heiko Stübner   2013-06-10  2877  
d3e5116119bd02 Heiko Stübner   2013-06-10  2878  		np_config = of_find_node_by_phandle(be32_to_cpup(phandle));
dd4d01f7bad886 Soren Brinkmann 2015-01-09 @2879  		ret = pinconf_generic_parse_dt_config(np_config, NULL,
d3e5116119bd02 Heiko Stübner   2013-06-10  2880  				&grp->data[j].configs, &grp->data[j].nconfigs);
d3e5116119bd02 Heiko Stübner   2013-06-10  2881  		if (ret)
d3e5116119bd02 Heiko Stübner   2013-06-10  2882  			return ret;
d3e5116119bd02 Heiko Stübner   2013-06-10  2883  	}
d3e5116119bd02 Heiko Stübner   2013-06-10  2884  
d3e5116119bd02 Heiko Stübner   2013-06-10  2885  	return 0;
d3e5116119bd02 Heiko Stübner   2013-06-10  2886  }
d3e5116119bd02 Heiko Stübner   2013-06-10  2887  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 24835 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rockchip/attachments/20200719/713377ac/attachment-0001.gz>


More information about the Linux-rockchip mailing list