Re: [PATCH v1 2/2] pinctrl: generic: improve apply_setting error verbosity

From: kbuild test robot
Date: Tue May 01 2018 - 04:35:48 EST


Hi Matheus,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on pinctrl/devel]
[also build test ERROR on v4.17-rc3 next-20180501]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Matheus-Castello/pinctrl-generic-improve-apply_setting-error-verbosity/20180501-160704
base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
config: x86_64-randconfig-x002-201817 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All error/warnings (new ones prefixed by >>):

drivers/pinctrl/pinconf.c: In function 'pinconf_apply_setting':
>> drivers/pinctrl/pinconf.c:177:5: error: implicit declaration of function 'pinconf_generic_get_param_property_name'; did you mean 'pinconf_generic_dump_config'? [-Werror=implicit-function-declaration]
pinconf_generic_get_param_property_name(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pinconf_generic_dump_config
>> drivers/pinctrl/pinconf.c:175:26: warning: format '%s' expects argument of type 'char *', but argument 5 has type 'int' [-Wformat=]
"%s error %d seting %s for pin %d\n",
~^
%d
drivers/pinctrl/pinconf.c:177:5:
pinconf_generic_get_param_property_name(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pctldev, setting->data.configs.num_configs,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setting->data.configs.configs),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

vim +177 drivers/pinctrl/pinconf.c

150
151 int pinconf_apply_setting(const struct pinctrl_setting *setting)
152 {
153 struct pinctrl_dev *pctldev = setting->pctldev;
154 const struct pinconf_ops *ops = pctldev->desc->confops;
155 int ret;
156
157 if (!ops) {
158 dev_err(pctldev->dev, "missing confops\n");
159 return -EINVAL;
160 }
161
162 switch (setting->type) {
163 case PIN_MAP_TYPE_CONFIGS_PIN:
164 if (!ops->pin_config_set) {
165 dev_err(pctldev->dev, "missing pin_config_set op\n");
166 return -EINVAL;
167 }
168 ret = ops->pin_config_set(pctldev,
169 setting->data.configs.group_or_pin,
170 setting->data.configs.configs,
171 setting->data.configs.num_configs);
172 if (ret < 0) {
173 #ifdef CONFIG_GENERIC_PINCONF
174 dev_err(pctldev->dev,
> 175 "%s error %d seting %s for pin %d\n",
176 pctldev->desc->name, ret,
> 177 pinconf_generic_get_param_property_name(
178 pctldev, setting->data.configs.num_configs,
179 setting->data.configs.configs),
180 setting->data.configs.group_or_pin);
181 #endif
182
183 dev_err(pctldev->dev,
184 "pin_config_set op failed for %s pin %d\n",
185 pctldev->desc->name,
186 setting->data.configs.group_or_pin);
187
188 return ret;
189 }
190 break;
191 case PIN_MAP_TYPE_CONFIGS_GROUP:
192 if (!ops->pin_config_group_set) {
193 dev_err(pctldev->dev,
194 "missing pin_config_group_set op\n");
195 return -EINVAL;
196 }
197 ret = ops->pin_config_group_set(pctldev,
198 setting->data.configs.group_or_pin,
199 setting->data.configs.configs,
200 setting->data.configs.num_configs);
201 if (ret < 0) {
202 dev_err(pctldev->dev,
203 "pin_config_group_set op failed for group %d\n",
204 setting->data.configs.group_or_pin);
205 return ret;
206 }
207 break;
208 default:
209 return -EINVAL;
210 }
211
212 return 0;
213 }
214

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip