[PATCH v1 05/11] pinctrl: pinmux: Add a convenient define PINCTRL_FUNCTION_DESC()

kernel test robot lkp at intel.com
Mon May 27 17:30:49 PDT 2024


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 linus/master v6.10-rc1 next-20240523]
[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-berlin-Make-use-of-struct-pinfunction/20240528-053304
base:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
patch link:    https://lore.kernel.org/r/20240527212742.1432960-6-andy.shevchenko%40gmail.com
patch subject: [PATCH v1 05/11] pinctrl: pinmux: Add a convenient define PINCTRL_FUNCTION_DESC()
config: riscv-defconfig (https://download.01.org/0day-ci/archive/20240528/202405280821.FcDAyD2b-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project bafda89a0944d947fc4b3b5663185e07a397ac30)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240528/202405280821.FcDAyD2b-lkp@intel.com/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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405280821.FcDAyD2b-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/pinctrl/pinmux.c:880:11: error: assigning to 'struct function_desc *' from incompatible type 'struct function_desc'; take the address with &
     880 |         function = PINCTRL_FUNCTION_DESC(name, groups, ngroups, data);
         |                  ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                    &(                                                )
   1 error generated.


vim +880 drivers/pinctrl/pinmux.c

   849	
   850	/**
   851	 * pinmux_generic_add_function() - adds a function group
   852	 * @pctldev: pin controller device
   853	 * @name: name of the function
   854	 * @groups: array of pin groups
   855	 * @num_groups: number of pin groups
   856	 * @data: pin controller driver specific data
   857	 */
   858	int pinmux_generic_add_function(struct pinctrl_dev *pctldev,
   859					const char *name,
   860					const char * const *groups,
   861					const unsigned int ngroups,
   862					void *data)
   863	{
   864		struct function_desc *function;
   865		int selector, error;
   866	
   867		if (!name)
   868			return -EINVAL;
   869	
   870		selector = pinmux_func_name_to_selector(pctldev, name);
   871		if (selector >= 0)
   872			return selector;
   873	
   874		selector = pctldev->num_functions;
   875	
   876		function = devm_kzalloc(pctldev->dev, sizeof(*function), GFP_KERNEL);
   877		if (!function)
   878			return -ENOMEM;
   879	
 > 880		function = PINCTRL_FUNCTION_DESC(name, groups, ngroups, data);
   881	
   882		error = radix_tree_insert(&pctldev->pin_function_tree, selector, function);
   883		if (error)
   884			return error;
   885	
   886		pctldev->num_functions++;
   887	
   888		return selector;
   889	}
   890	EXPORT_SYMBOL_GPL(pinmux_generic_add_function);
   891	

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



More information about the linux-arm-kernel mailing list