Hi Linus,
I love your patch! Yet something to improve:
[auto build test ERROR on gpio/for-next]
[also build test ERROR on v5.8-rc6 next-20200721]
[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/Linus-Walleij/gpio-Retire-the-ex...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git for-next
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/pinctrl/pinctrl-sx150x.c: In function 'sx150x_probe':
> drivers/pinctrl/pinctrl-sx150x.c:1225:9: error: implicit
declaration of function 'gpiochip_irqchip_add_nested'; did you mean
'gpiochip_irqchip_add_domain'? [-Werror=implicit-function-declaration]
1225 | ret = gpiochip_irqchip_add_nested(&pctl->gpio,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| gpiochip_irqchip_add_domain
> drivers/pinctrl/pinctrl-sx150x.c:1241:3: error: implicit
declaration of function 'gpiochip_set_nested_irqchip'
[-Werror=implicit-function-declaration]
1241 |
gpiochip_set_nested_irqchip(&pctl->gpio,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
drivers/gpio/gpio-wcove.c: In function 'wcove_gpio_probe':
> drivers/gpio/gpio-wcove.c:451:8: error: implicit declaration of
function 'gpiochip_irqchip_add_nested'; did you mean
'gpiochip_irqchip_add_domain'? [-Werror=implicit-function-declaration]
451 | ret = gpiochip_irqchip_add_nested(&wg->chip, &wcove_irqchip, 0,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| gpiochip_irqchip_add_domain
> drivers/gpio/gpio-wcove.c:471:2: error: implicit declaration of
function 'gpiochip_set_nested_irqchip' [-Werror=implicit-function-declaration]
471 | gpiochip_set_nested_irqchip(&wg->chip, &wcove_irqchip,
virq);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +1225 drivers/pinctrl/pinctrl-sx150x.c
0db0f26c2c5d43 Andrey Smirnov 2016-11-07 1097
9e80f9064e73f9 Neil Armstrong 2016-10-21 1098 static int sx150x_probe(struct
i2c_client *client,
9e80f9064e73f9 Neil Armstrong 2016-10-21 1099 const struct i2c_device_id *id)
9e80f9064e73f9 Neil Armstrong 2016-10-21 1100 {
9e80f9064e73f9 Neil Armstrong 2016-10-21 1101 static const u32 i2c_funcs =
I2C_FUNC_SMBUS_BYTE_DATA |
9e80f9064e73f9 Neil Armstrong 2016-10-21 1102
I2C_FUNC_SMBUS_WRITE_WORD_DATA;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1103 struct device *dev =
&client->dev;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1104 struct sx150x_pinctrl *pctl;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1105 int ret;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1106
9e80f9064e73f9 Neil Armstrong 2016-10-21 1107 if
(!i2c_check_functionality(client->adapter, i2c_funcs))
9e80f9064e73f9 Neil Armstrong 2016-10-21 1108 return -ENOSYS;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1109
9e80f9064e73f9 Neil Armstrong 2016-10-21 1110 pctl = devm_kzalloc(dev,
sizeof(*pctl), GFP_KERNEL);
9e80f9064e73f9 Neil Armstrong 2016-10-21 1111 if (!pctl)
9e80f9064e73f9 Neil Armstrong 2016-10-21 1112 return -ENOMEM;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1113
0db0f26c2c5d43 Andrey Smirnov 2016-11-07 1114 i2c_set_clientdata(client, pctl);
0db0f26c2c5d43 Andrey Smirnov 2016-11-07 1115
9e80f9064e73f9 Neil Armstrong 2016-10-21 1116 pctl->dev = dev;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1117 pctl->client = client;
e3ba8120681171 Andrey Smirnov 2016-11-07 1118
e3ba8120681171 Andrey Smirnov 2016-11-07 1119 if (dev->of_node)
e3ba8120681171 Andrey Smirnov 2016-11-07 1120 pctl->data =
of_device_get_match_data(dev);
e3ba8120681171 Andrey Smirnov 2016-11-07 1121 else
e3ba8120681171 Andrey Smirnov 2016-11-07 1122 pctl->data = (struct
sx150x_device_data *)id->driver_data;
e3ba8120681171 Andrey Smirnov 2016-11-07 1123
e3ba8120681171 Andrey Smirnov 2016-11-07 1124 if (!pctl->data)
e3ba8120681171 Andrey Smirnov 2016-11-07 1125 return -EINVAL;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1126
6489677f86c330 Andrey Smirnov 2016-11-07 1127 pctl->regmap =
devm_regmap_init(dev, NULL, pctl,
6489677f86c330 Andrey Smirnov 2016-11-07 1128 &sx150x_regmap_config);
0db0f26c2c5d43 Andrey Smirnov 2016-11-07 1129 if (IS_ERR(pctl->regmap)) {
0db0f26c2c5d43 Andrey Smirnov 2016-11-07 1130 ret = PTR_ERR(pctl->regmap);
0db0f26c2c5d43 Andrey Smirnov 2016-11-07 1131 dev_err(dev, "Failed to allocate
register map: %d\n",
0db0f26c2c5d43 Andrey Smirnov 2016-11-07 1132 ret);
0db0f26c2c5d43 Andrey Smirnov 2016-11-07 1133 return ret;
0db0f26c2c5d43 Andrey Smirnov 2016-11-07 1134 }
0db0f26c2c5d43 Andrey Smirnov 2016-11-07 1135
9e80f9064e73f9 Neil Armstrong 2016-10-21 1136 mutex_init(&pctl->lock);
9e80f9064e73f9 Neil Armstrong 2016-10-21 1137
9e80f9064e73f9 Neil Armstrong 2016-10-21 1138 ret = sx150x_init_hw(pctl);
9e80f9064e73f9 Neil Armstrong 2016-10-21 1139 if (ret)
9e80f9064e73f9 Neil Armstrong 2016-10-21 1140 return ret;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1141
1a1d39e1b8dd1d Peter Rosin 2018-01-17 1142 /* Pinctrl_desc */
1a1d39e1b8dd1d Peter Rosin 2018-01-17 1143 pctl->pinctrl_desc.name =
"sx150x-pinctrl";
1a1d39e1b8dd1d Peter Rosin 2018-01-17 1144 pctl->pinctrl_desc.pctlops =
&sx150x_pinctrl_ops;
1a1d39e1b8dd1d Peter Rosin 2018-01-17 1145 pctl->pinctrl_desc.confops =
&sx150x_pinconf_ops;
1a1d39e1b8dd1d Peter Rosin 2018-01-17 1146 pctl->pinctrl_desc.pins =
pctl->data->pins;
1a1d39e1b8dd1d Peter Rosin 2018-01-17 1147 pctl->pinctrl_desc.npins =
pctl->data->npins;
1a1d39e1b8dd1d Peter Rosin 2018-01-17 1148 pctl->pinctrl_desc.owner =
THIS_MODULE;
1a1d39e1b8dd1d Peter Rosin 2018-01-17 1149
1a1d39e1b8dd1d Peter Rosin 2018-01-17 1150 ret =
devm_pinctrl_register_and_init(dev, &pctl->pinctrl_desc,
1a1d39e1b8dd1d Peter Rosin 2018-01-17 1151 pctl,
&pctl->pctldev);
1a1d39e1b8dd1d Peter Rosin 2018-01-17 1152 if (ret) {
1a1d39e1b8dd1d Peter Rosin 2018-01-17 1153 dev_err(dev, "Failed to register
pinctrl device\n");
1a1d39e1b8dd1d Peter Rosin 2018-01-17 1154 return ret;
1a1d39e1b8dd1d Peter Rosin 2018-01-17 1155 }
1a1d39e1b8dd1d Peter Rosin 2018-01-17 1156
1a1d39e1b8dd1d Peter Rosin 2018-01-17 1157 ret =
pinctrl_enable(pctl->pctldev);
1a1d39e1b8dd1d Peter Rosin 2018-01-17 1158 if (ret) {
1a1d39e1b8dd1d Peter Rosin 2018-01-17 1159 dev_err(dev, "Failed to enable
pinctrl device\n");
1a1d39e1b8dd1d Peter Rosin 2018-01-17 1160 return ret;
1a1d39e1b8dd1d Peter Rosin 2018-01-17 1161 }
1a1d39e1b8dd1d Peter Rosin 2018-01-17 1162
9e80f9064e73f9 Neil Armstrong 2016-10-21 1163 /* Register GPIO controller */
9e80f9064e73f9 Neil Armstrong 2016-10-21 1164 pctl->gpio.base = -1;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1165 pctl->gpio.ngpio =
pctl->data->npins;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1166 pctl->gpio.get_direction =
sx150x_gpio_get_direction;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1167 pctl->gpio.direction_input =
sx150x_gpio_direction_input;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1168 pctl->gpio.direction_output =
sx150x_gpio_direction_output;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1169 pctl->gpio.get = sx150x_gpio_get;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1170 pctl->gpio.set = sx150x_gpio_set;
2956b5d94a76b5 Mika Westerberg 2017-01-23 1171 pctl->gpio.set_config =
gpiochip_generic_config;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1172 pctl->gpio.parent = dev;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1173 #ifdef CONFIG_OF_GPIO
9e80f9064e73f9 Neil Armstrong 2016-10-21 1174 pctl->gpio.of_node =
dev->of_node;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1175 #endif
9e80f9064e73f9 Neil Armstrong 2016-10-21 1176 pctl->gpio.can_sleep = true;
a9d9f6b83f1bb0 Nicholas Mc Guire 2018-12-02 1177 pctl->gpio.label =
devm_kstrdup(dev, client->name, GFP_KERNEL);
a9d9f6b83f1bb0 Nicholas Mc Guire 2018-12-02 1178 if (!pctl->gpio.label)
a9d9f6b83f1bb0 Nicholas Mc Guire 2018-12-02 1179 return -ENOMEM;
a9d9f6b83f1bb0 Nicholas Mc Guire 2018-12-02 1180
ec61168bc0bc03 Peter Rosin 2016-11-23 1181 /*
ec61168bc0bc03 Peter Rosin 2016-11-23 1182 * Setting multiple pins is not safe
when all pins are not
ec61168bc0bc03 Peter Rosin 2016-11-23 1183 * handled by the same regmap
register. The oscio pin (present
ec61168bc0bc03 Peter Rosin 2016-11-23 1184 * on the SX150X_789 chips) lives in
its own register, so
ec61168bc0bc03 Peter Rosin 2016-11-23 1185 * would require locking that is not
in place at this time.
ec61168bc0bc03 Peter Rosin 2016-11-23 1186 */
ec61168bc0bc03 Peter Rosin 2016-11-23 1187 if (pctl->data->model !=
SX150X_789)
ec61168bc0bc03 Peter Rosin 2016-11-23 1188 pctl->gpio.set_multiple =
sx150x_gpio_set_multiple;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1189
9e80f9064e73f9 Neil Armstrong 2016-10-21 1190 ret = devm_gpiochip_add_data(dev,
&pctl->gpio, pctl);
9e80f9064e73f9 Neil Armstrong 2016-10-21 1191 if (ret)
9e80f9064e73f9 Neil Armstrong 2016-10-21 1192 return ret;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1193
b930151e5b55a0 Peter Rosin 2018-01-17 1194 ret =
gpiochip_add_pin_range(&pctl->gpio, dev_name(dev),
b930151e5b55a0 Peter Rosin 2018-01-17 1195 0, 0,
pctl->data->npins);
b930151e5b55a0 Peter Rosin 2018-01-17 1196 if (ret)
b930151e5b55a0 Peter Rosin 2018-01-17 1197 return ret;
b930151e5b55a0 Peter Rosin 2018-01-17 1198
9e80f9064e73f9 Neil Armstrong 2016-10-21 1199 /* Add Interrupt support if an irq is
specified */
9e80f9064e73f9 Neil Armstrong 2016-10-21 1200 if (client->irq > 0) {
9e80f9064e73f9 Neil Armstrong 2016-10-21 1201 pctl->irq_chip.irq_mask =
sx150x_irq_mask;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1202 pctl->irq_chip.irq_unmask =
sx150x_irq_unmask;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1203 pctl->irq_chip.irq_set_type =
sx150x_irq_set_type;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1204 pctl->irq_chip.irq_bus_lock =
sx150x_irq_bus_lock;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1205 pctl->irq_chip.irq_bus_sync_unlock
= sx150x_irq_bus_sync_unlock;
a9d9f6b83f1bb0 Nicholas Mc Guire 2018-12-02 1206 pctl->irq_chip.name =
devm_kstrdup(dev, client->name,
a9d9f6b83f1bb0 Nicholas Mc Guire 2018-12-02 1207 GFP_KERNEL);
a9d9f6b83f1bb0 Nicholas Mc Guire 2018-12-02 1208 if (!pctl->irq_chip.name)
a9d9f6b83f1bb0 Nicholas Mc Guire 2018-12-02 1209 return -ENOMEM;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1210
9e80f9064e73f9 Neil Armstrong 2016-10-21 1211 pctl->irq.masked = ~0;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1212 pctl->irq.sense = 0;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1213
080c489dde6355 Andrey Smirnov 2016-11-07 1214 /*
080c489dde6355 Andrey Smirnov 2016-11-07 1215 * Because sx150x_irq_threaded_fn
invokes all of the
080c489dde6355 Andrey Smirnov 2016-11-07 1216 * nested interrrupt handlers via
handle_nested_irq,
080c489dde6355 Andrey Smirnov 2016-11-07 1217 * any "handler" passed to
gpiochip_irqchip_add()
080c489dde6355 Andrey Smirnov 2016-11-07 1218 * below is going to be ignored, so
the choice of the
080c489dde6355 Andrey Smirnov 2016-11-07 1219 * function does not matter that
much.
080c489dde6355 Andrey Smirnov 2016-11-07 1220 *
080c489dde6355 Andrey Smirnov 2016-11-07 1221 * We set it to handle_bad_irq to
avoid confusion,
080c489dde6355 Andrey Smirnov 2016-11-07 1222 * plus it will be instantly
noticeable if it is ever
080c489dde6355 Andrey Smirnov 2016-11-07 1223 * called (should not happen)
080c489dde6355 Andrey Smirnov 2016-11-07 1224 */
f821444508743a Linus Walleij 2016-11-25 @1225 ret =
gpiochip_irqchip_add_nested(&pctl->gpio,
9e80f9064e73f9 Neil Armstrong 2016-10-21 1226 &pctl->irq_chip, 0,
080c489dde6355 Andrey Smirnov 2016-11-07 1227 handle_bad_irq, IRQ_TYPE_NONE);
9e80f9064e73f9 Neil Armstrong 2016-10-21 1228 if (ret) {
9e80f9064e73f9 Neil Armstrong 2016-10-21 1229 dev_err(dev, "could not connect
irqchip to gpiochip\n");
9e80f9064e73f9 Neil Armstrong 2016-10-21 1230 return ret;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1231 }
9e80f9064e73f9 Neil Armstrong 2016-10-21 1232
9e80f9064e73f9 Neil Armstrong 2016-10-21 1233 ret = devm_request_threaded_irq(dev,
client->irq, NULL,
9e80f9064e73f9 Neil Armstrong 2016-10-21 1234 sx150x_irq_thread_fn,
9e80f9064e73f9 Neil Armstrong 2016-10-21 1235 IRQF_ONESHOT | IRQF_SHARED |
9e80f9064e73f9 Neil Armstrong 2016-10-21 1236 IRQF_TRIGGER_FALLING,
9e80f9064e73f9 Neil Armstrong 2016-10-21 1237 pctl->irq_chip.name, pctl);
9e80f9064e73f9 Neil Armstrong 2016-10-21 1238 if (ret < 0)
9e80f9064e73f9 Neil Armstrong 2016-10-21 1239 return ret;
f821444508743a Linus Walleij 2016-11-25 1240
f821444508743a Linus Walleij 2016-11-25 @1241
gpiochip_set_nested_irqchip(&pctl->gpio,
f821444508743a Linus Walleij 2016-11-25 1242 &pctl->irq_chip,
f821444508743a Linus Walleij 2016-11-25 1243 client->irq);
9e80f9064e73f9 Neil Armstrong 2016-10-21 1244 }
9e80f9064e73f9 Neil Armstrong 2016-10-21 1245
9e80f9064e73f9 Neil Armstrong 2016-10-21 1246 return 0;
9e80f9064e73f9 Neil Armstrong 2016-10-21 1247 }
9e80f9064e73f9 Neil Armstrong 2016-10-21 1248
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org