Re: [PATCH 3/3] pinctrl: renesas: Add pins/groups/functions for I2C, SCIF and USB supported by RZ/G2L SoC

From: kernel test robot
Date: Wed Jun 16 2021 - 22:56:14 EST


Hi Lad,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on renesas-drivers/renesas-pinctrl]
[also build test WARNING on robh/for-next pinctrl/devel v5.13-rc6 next-20210616]
[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/Lad-Prabhakar/pinctrl-Add-RZ-G2L-pin-and-gpio-driver/20210616-225928
base: https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git renesas-pinctrl
config: parisc-randconfig-s031-20210617 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://github.com/0day-ci/linux/commit/0cc4856c569c78a2855607272bccac66fd3d8e9e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Lad-Prabhakar/pinctrl-Add-RZ-G2L-pin-and-gpio-driver/20210616-225928
git checkout 0cc4856c569c78a2855607272bccac66fd3d8e9e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=parisc

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

drivers/pinctrl/renesas/pinctrl-rzg2l.c: In function 'rzg2l_pinctrl_set_mux':
drivers/pinctrl/renesas/pinctrl-rzg2l.c:115:9: error: implicit declaration of function 'pinmux_generic_get_function'; did you mean 'pinmux_generic_free_functions'? [-Werror=implicit-function-declaration]
115 | func = pinmux_generic_get_function(pctldev, func_selector);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| pinmux_generic_free_functions
>> drivers/pinctrl/renesas/pinctrl-rzg2l.c:115:7: warning: assignment to 'struct function_desc *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
115 | func = pinmux_generic_get_function(pctldev, func_selector);
| ^
drivers/pinctrl/renesas/pinctrl-rzg2l.c:118:10: error: implicit declaration of function 'pinctrl_generic_get_group' [-Werror=implicit-function-declaration]
118 | group = pinctrl_generic_get_group(pctldev, group_selector);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/pinctrl/renesas/pinctrl-rzg2l.c:118:8: warning: assignment to 'struct group_desc *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
118 | group = pinctrl_generic_get_group(pctldev, group_selector);
| ^
drivers/pinctrl/renesas/pinctrl-rzg2l.c:122:14: error: dereferencing pointer to incomplete type 'struct group_desc'
122 | pins = group->pins;
| ^~
In file included from include/linux/printk.h:409,
from include/linux/kernel.h:17,
from include/linux/list.h:9,
from include/linux/kobject.h:19,
from include/linux/of.h:17,
from drivers/pinctrl/renesas/pinctrl-rzg2l.c:8:
drivers/pinctrl/renesas/pinctrl-rzg2l.c:126:7: error: dereferencing pointer to incomplete type 'struct function_desc'
126 | func->name, group->name);
| ^~
include/linux/dynamic_debug.h:129:15: note: in definition of macro '__dynamic_func_call'
129 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzg2l.c:125:2: note: in expansion of macro 'dev_dbg'
125 | dev_dbg(pctldev->dev, "enable function %s group %s\n",
| ^~~~~~~
drivers/pinctrl/renesas/pinctrl-rzg2l.c: At top level:
drivers/pinctrl/renesas/pinctrl-rzg2l.c:135:22: error: 'pinctrl_generic_get_group_count' undeclared here (not in a function)
135 | .get_groups_count = pinctrl_generic_get_group_count,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzg2l.c:136:20: error: 'pinctrl_generic_get_group_name' undeclared here (not in a function)
136 | .get_group_name = pinctrl_generic_get_group_name,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzg2l.c:137:20: error: 'pinctrl_generic_get_group_pins' undeclared here (not in a function); did you mean 'pinctrl_get_group_pins'?
137 | .get_group_pins = pinctrl_generic_get_group_pins,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| pinctrl_get_group_pins
drivers/pinctrl/renesas/pinctrl-rzg2l.c:143:25: error: 'pinmux_generic_get_function_count' undeclared here (not in a function); did you mean 'pinmux_generic_free_functions'?
143 | .get_functions_count = pinmux_generic_get_function_count,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| pinmux_generic_free_functions
drivers/pinctrl/renesas/pinctrl-rzg2l.c:144:23: error: 'pinmux_generic_get_function_name' undeclared here (not in a function); did you mean 'pinmux_generic_free_functions'?
144 | .get_function_name = pinmux_generic_get_function_name,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| pinmux_generic_free_functions
drivers/pinctrl/renesas/pinctrl-rzg2l.c:145:25: error: 'pinmux_generic_get_function_groups' undeclared here (not in a function); did you mean 'pinmux_generic_free_functions'?
145 | .get_function_groups = pinmux_generic_get_function_groups,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| pinmux_generic_free_functions
drivers/pinctrl/renesas/pinctrl-rzg2l.c: In function 'rzg2l_pinctrl_add_groups':
drivers/pinctrl/renesas/pinctrl-rzg2l.c:155:56: error: invalid use of undefined type 'struct group_desc'
155 | const struct group_desc *group = pctrl->psoc->groups + i;
| ^
drivers/pinctrl/renesas/pinctrl-rzg2l.c:157:9: error: implicit declaration of function 'pinctrl_generic_add_group' [-Werror=implicit-function-declaration]
157 | ret = pinctrl_generic_add_group(pctrl->pctrl_dev, group->name,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzg2l.c:157:58: error: dereferencing pointer to incomplete type 'const struct group_desc'
157 | ret = pinctrl_generic_add_group(pctrl->pctrl_dev, group->name,
| ^~
drivers/pinctrl/renesas/pinctrl-rzg2l.c: In function 'rzg2l_pinctrl_add_functions':
drivers/pinctrl/renesas/pinctrl-rzg2l.c:175:57: error: invalid use of undefined type 'struct function_desc'
175 | const struct function_desc *func = pctrl->psoc->funcs + i;
| ^
drivers/pinctrl/renesas/pinctrl-rzg2l.c:177:9: error: implicit declaration of function 'pinmux_generic_add_function'; did you mean 'pinmux_generic_free_functions'? [-Werror=implicit-function-declaration]
177 | ret = pinmux_generic_add_function(pctrl->pctrl_dev, func->name,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| pinmux_generic_free_functions
drivers/pinctrl/renesas/pinctrl-rzg2l.c:177:59: error: dereferencing pointer to incomplete type 'const struct function_desc'
177 | ret = pinmux_generic_add_function(pctrl->pctrl_dev, func->name,
| ^~
At top level:
drivers/pinctrl/renesas/pinctrl-rzg2l.c:514:34: warning: 'rzg2l_pinctrl_of_table' defined but not used [-Wunused-const-variable=]
514 | static const struct of_device_id rzg2l_pinctrl_of_table[] = {
| ^~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for PINCTRL_RZG2L
Depends on PINCTRL && OF && (ARCH_R9A07G044 || COMPILE_TEST
Selected by
- PINCTRL_PFC_R9A07G044 && PINCTRL


vim +115 drivers/pinctrl/renesas/pinctrl-rzg2l.c

64165286d371f1 Lad Prabhakar 2021-06-16 103
64165286d371f1 Lad Prabhakar 2021-06-16 104 static int rzg2l_pinctrl_set_mux(struct pinctrl_dev *pctldev,
64165286d371f1 Lad Prabhakar 2021-06-16 105 unsigned int func_selector,
64165286d371f1 Lad Prabhakar 2021-06-16 106 unsigned int group_selector)
64165286d371f1 Lad Prabhakar 2021-06-16 107 {
64165286d371f1 Lad Prabhakar 2021-06-16 108 struct rzg2l_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev);
64165286d371f1 Lad Prabhakar 2021-06-16 109 struct function_desc *func;
64165286d371f1 Lad Prabhakar 2021-06-16 110 struct group_desc *group;
64165286d371f1 Lad Prabhakar 2021-06-16 111 unsigned long data;
64165286d371f1 Lad Prabhakar 2021-06-16 112 int *pins;
64165286d371f1 Lad Prabhakar 2021-06-16 113 int i;
64165286d371f1 Lad Prabhakar 2021-06-16 114
64165286d371f1 Lad Prabhakar 2021-06-16 @115 func = pinmux_generic_get_function(pctldev, func_selector);
64165286d371f1 Lad Prabhakar 2021-06-16 116 if (!func)
64165286d371f1 Lad Prabhakar 2021-06-16 117 return -EINVAL;
64165286d371f1 Lad Prabhakar 2021-06-16 @118 group = pinctrl_generic_get_group(pctldev, group_selector);
64165286d371f1 Lad Prabhakar 2021-06-16 119 if (!group)
64165286d371f1 Lad Prabhakar 2021-06-16 120 return -EINVAL;
64165286d371f1 Lad Prabhakar 2021-06-16 121
64165286d371f1 Lad Prabhakar 2021-06-16 122 pins = group->pins;
64165286d371f1 Lad Prabhakar 2021-06-16 123 data = (unsigned long)group->data;
64165286d371f1 Lad Prabhakar 2021-06-16 124
64165286d371f1 Lad Prabhakar 2021-06-16 125 dev_dbg(pctldev->dev, "enable function %s group %s\n",
64165286d371f1 Lad Prabhakar 2021-06-16 126 func->name, group->name);
64165286d371f1 Lad Prabhakar 2021-06-16 127
64165286d371f1 Lad Prabhakar 2021-06-16 128 for (i = 0; i < group->num_pins; i++)
64165286d371f1 Lad Prabhakar 2021-06-16 129 rzg2l_pinctrl_set_pfc_mode(pctrl, *(pins + i), data);
64165286d371f1 Lad Prabhakar 2021-06-16 130
64165286d371f1 Lad Prabhakar 2021-06-16 131 return 0;
64165286d371f1 Lad Prabhakar 2021-06-16 132 };
64165286d371f1 Lad Prabhakar 2021-06-16 133

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip