Re: [PATCH v1 3/4] pinctrl: nuvoton: Convert to use struct group_desc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andy,

kernel test robot noticed the following build errors:

[auto build test ERROR on linusw-pinctrl/devel]
[also build test ERROR on linusw-pinctrl/for-next next-20240611]
[cannot apply to linus/master v6.10-rc3]
[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-nuvoton-Convert-to-use-struct-pingroup-and-PINCTRL_PINGROUP/20240611-173545
base:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
patch link:    https://lore.kernel.org/r/20240611093127.90210-4-andy.shevchenko%40gmail.com
patch subject: [PATCH v1 3/4] pinctrl: nuvoton: Convert to use struct group_desc
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20240612/202406120754.BLemVAqf-lkp@xxxxxxxxx/config)
compiler: alpha-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240612/202406120754.BLemVAqf-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406120754.BLemVAqf-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   drivers/pinctrl/nuvoton/pinctrl-ma35.c: In function 'ma35_pinctrl_dt_node_to_map_func':
>> drivers/pinctrl/nuvoton/pinctrl-ma35.c:228:28: error: 'struct group_desc' has no member named 'npins'
     228 |         for (i = 0; i < grp->npins; i++) {
         |                            ^~
   drivers/pinctrl/nuvoton/pinctrl-ma35.c: In function 'ma35_pinmux_set_mux':
   drivers/pinctrl/nuvoton/pinctrl-ma35.c:287:28: error: 'struct group_desc' has no member named 'npins'
     287 |         for (i = 0; i < grp->npins; i++) {
         |                            ^~


vim +228 drivers/pinctrl/nuvoton/pinctrl-ma35.c

ecc5bf868673446 Jacky Huang     2024-05-21  184  
ecc5bf868673446 Jacky Huang     2024-05-21  185  static int ma35_pinctrl_dt_node_to_map_func(struct pinctrl_dev *pctldev,
ecc5bf868673446 Jacky Huang     2024-05-21  186  					    struct device_node *np,
ecc5bf868673446 Jacky Huang     2024-05-21  187  					    struct pinctrl_map **map,
ecc5bf868673446 Jacky Huang     2024-05-21  188  					    unsigned int *num_maps)
ecc5bf868673446 Jacky Huang     2024-05-21  189  {
ecc5bf868673446 Jacky Huang     2024-05-21  190  	struct ma35_pinctrl *npctl = pinctrl_dev_get_drvdata(pctldev);
888aa25ee6ce72d Andy Shevchenko 2024-06-11  191  	struct ma35_pin_setting *setting;
ecc5bf868673446 Jacky Huang     2024-05-21  192  	struct pinctrl_map *new_map;
ecc5bf868673446 Jacky Huang     2024-05-21  193  	struct device_node *parent;
888aa25ee6ce72d Andy Shevchenko 2024-06-11  194  	struct group_desc *grp;
ecc5bf868673446 Jacky Huang     2024-05-21  195  	int map_num = 1;
ecc5bf868673446 Jacky Huang     2024-05-21  196  	int i;
ecc5bf868673446 Jacky Huang     2024-05-21  197  
ecc5bf868673446 Jacky Huang     2024-05-21  198  	/*
ecc5bf868673446 Jacky Huang     2024-05-21  199  	 * first find the group of this node and check if we need create
ecc5bf868673446 Jacky Huang     2024-05-21  200  	 * config maps for pins
ecc5bf868673446 Jacky Huang     2024-05-21  201  	 */
ecc5bf868673446 Jacky Huang     2024-05-21  202  	grp = ma35_pinctrl_find_group_by_name(npctl, np->name);
ecc5bf868673446 Jacky Huang     2024-05-21  203  	if (!grp) {
ecc5bf868673446 Jacky Huang     2024-05-21  204  		dev_err(npctl->dev, "unable to find group for node %s\n", np->name);
ecc5bf868673446 Jacky Huang     2024-05-21  205  		return -EINVAL;
ecc5bf868673446 Jacky Huang     2024-05-21  206  	}
ecc5bf868673446 Jacky Huang     2024-05-21  207  
888aa25ee6ce72d Andy Shevchenko 2024-06-11  208  	map_num += grp->grp.npins;
ecc5bf868673446 Jacky Huang     2024-05-21  209  	new_map = devm_kcalloc(pctldev->dev, map_num, sizeof(*new_map), GFP_KERNEL);
ecc5bf868673446 Jacky Huang     2024-05-21  210  	if (!new_map)
ecc5bf868673446 Jacky Huang     2024-05-21  211  		return -ENOMEM;
ecc5bf868673446 Jacky Huang     2024-05-21  212  
ecc5bf868673446 Jacky Huang     2024-05-21  213  	*map = new_map;
ecc5bf868673446 Jacky Huang     2024-05-21  214  	*num_maps = map_num;
ecc5bf868673446 Jacky Huang     2024-05-21  215  	/* create mux map */
ecc5bf868673446 Jacky Huang     2024-05-21  216  	parent = of_get_parent(np);
ecc5bf868673446 Jacky Huang     2024-05-21  217  	if (!parent)
ecc5bf868673446 Jacky Huang     2024-05-21  218  		return -EINVAL;
ecc5bf868673446 Jacky Huang     2024-05-21  219  
888aa25ee6ce72d Andy Shevchenko 2024-06-11  220  	setting = grp->data;
888aa25ee6ce72d Andy Shevchenko 2024-06-11  221  
ecc5bf868673446 Jacky Huang     2024-05-21  222  	new_map[0].type = PIN_MAP_TYPE_MUX_GROUP;
ecc5bf868673446 Jacky Huang     2024-05-21  223  	new_map[0].data.mux.function = parent->name;
ecc5bf868673446 Jacky Huang     2024-05-21  224  	new_map[0].data.mux.group = np->name;
ecc5bf868673446 Jacky Huang     2024-05-21  225  	of_node_put(parent);
ecc5bf868673446 Jacky Huang     2024-05-21  226  
ecc5bf868673446 Jacky Huang     2024-05-21  227  	new_map++;
ecc5bf868673446 Jacky Huang     2024-05-21 @228  	for (i = 0; i < grp->npins; i++) {
ecc5bf868673446 Jacky Huang     2024-05-21  229  		new_map[i].type = PIN_MAP_TYPE_CONFIGS_PIN;
888aa25ee6ce72d Andy Shevchenko 2024-06-11  230  		new_map[i].data.configs.group_or_pin = pin_get_name(pctldev, grp->grp.pins[i]);
888aa25ee6ce72d Andy Shevchenko 2024-06-11  231  		new_map[i].data.configs.configs = setting[i].configs;
888aa25ee6ce72d Andy Shevchenko 2024-06-11  232  		new_map[i].data.configs.num_configs = setting[i].nconfigs;
ecc5bf868673446 Jacky Huang     2024-05-21  233  	}
ecc5bf868673446 Jacky Huang     2024-05-21  234  	dev_dbg(pctldev->dev, "maps: function %s group %s num %d\n",
ecc5bf868673446 Jacky Huang     2024-05-21  235  		(*map)->data.mux.function, (*map)->data.mux.group, map_num);
ecc5bf868673446 Jacky Huang     2024-05-21  236  
ecc5bf868673446 Jacky Huang     2024-05-21  237  	return 0;
ecc5bf868673446 Jacky Huang     2024-05-21  238  }
ecc5bf868673446 Jacky Huang     2024-05-21  239  

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




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux