From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v5 02/15] gpio: regmap: set gpio_chip of_node
Date: Sat, 20 Mar 2021 09:47:00 +0800 [thread overview]
Message-ID: <202103200940.N4OsEzyx-lkp@intel.com> (raw)
In-Reply-To: <20210306155712.4298-3-noltari@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 6111 bytes --]
Hi "Álvaro,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on pinctrl/devel]
[also build test ERROR on robh/for-next gpio/for-next v5.12-rc3 next-20210319]
[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/lvaro-Fern-ndez-Rojas/pinctrl-add-BCM63XX-pincontrol-support/20210307-115258
base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
config: xtensa-randconfig-r014-20210318 (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/46aec6ed90edf467c2e19c6e91e17d6b7567967f
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review lvaro-Fern-ndez-Rojas/pinctrl-add-BCM63XX-pincontrol-support/20210307-115258
git checkout 46aec6ed90edf467c2e19c6e91e17d6b7567967f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/gpio/gpio-regmap.c: In function 'gpio_regmap_register':
>> drivers/gpio/gpio-regmap.c:253:7: error: 'struct gpio_chip' has no member named 'of_node'
253 | chip->of_node = to_of_node(config->fwnode);
| ^~
drivers/gpio/gpio-regmap.c:255:7: error: 'struct gpio_chip' has no member named 'of_node'
255 | chip->of_node = dev_of_node(config->parent);
| ^~
vim +253 drivers/gpio/gpio-regmap.c
192
193 /**
194 * gpio_regmap_register() - Register a generic regmap GPIO controller
195 * @config: configuration for gpio_regmap
196 *
197 * Return: A pointer to the registered gpio_regmap or ERR_PTR error value.
198 */
199 struct gpio_regmap *gpio_regmap_register(const struct gpio_regmap_config *config)
200 {
201 struct gpio_regmap *gpio;
202 struct gpio_chip *chip;
203 int ret;
204
205 if (!config->parent)
206 return ERR_PTR(-EINVAL);
207
208 if (!config->ngpio)
209 return ERR_PTR(-EINVAL);
210
211 /* we need at least one */
212 if (!config->reg_dat_base && !config->reg_set_base)
213 return ERR_PTR(-EINVAL);
214
215 /* if we have a direction register we need both input and output */
216 if ((config->reg_dir_out_base || config->reg_dir_in_base) &&
217 (!config->reg_dat_base || !config->reg_set_base))
218 return ERR_PTR(-EINVAL);
219
220 /* we don't support having both registers simultaneously for now */
221 if (config->reg_dir_out_base && config->reg_dir_in_base)
222 return ERR_PTR(-EINVAL);
223
224 gpio = kzalloc(sizeof(*gpio), GFP_KERNEL);
225 if (!gpio)
226 return ERR_PTR(-ENOMEM);
227
228 gpio->parent = config->parent;
229 gpio->regmap = config->regmap;
230 gpio->ngpio_per_reg = config->ngpio_per_reg;
231 gpio->reg_stride = config->reg_stride;
232 gpio->reg_mask_xlate = config->reg_mask_xlate;
233 gpio->reg_dat_base = config->reg_dat_base;
234 gpio->reg_set_base = config->reg_set_base;
235 gpio->reg_clr_base = config->reg_clr_base;
236 gpio->reg_dir_in_base = config->reg_dir_in_base;
237 gpio->reg_dir_out_base = config->reg_dir_out_base;
238
239 /* if not set, assume there is only one register */
240 if (!gpio->ngpio_per_reg)
241 gpio->ngpio_per_reg = config->ngpio;
242
243 /* if not set, assume they are consecutive */
244 if (!gpio->reg_stride)
245 gpio->reg_stride = 1;
246
247 if (!gpio->reg_mask_xlate)
248 gpio->reg_mask_xlate = gpio_regmap_simple_xlate;
249
250 chip = &gpio->gpio_chip;
251 chip->parent = config->parent;
252 if (config->fwnode)
> 253 chip->of_node = to_of_node(config->fwnode);
254 else
255 chip->of_node = dev_of_node(config->parent);
256 chip->base = -1;
257 chip->ngpio = config->ngpio;
258 chip->names = config->names;
259 chip->label = config->label ?: dev_name(config->parent);
260
261 /*
262 * If our regmap is fast_io we should probably set can_sleep to false.
263 * Right now, the regmap doesn't save this property, nor is there any
264 * access function for it.
265 * The only regmap type which uses fast_io is regmap-mmio. For now,
266 * assume a safe default of true here.
267 */
268 chip->can_sleep = true;
269
270 chip->get = gpio_regmap_get;
271 if (gpio->reg_set_base && gpio->reg_clr_base)
272 chip->set = gpio_regmap_set_with_clear;
273 else if (gpio->reg_set_base)
274 chip->set = gpio_regmap_set;
275
276 if (gpio->reg_dir_in_base || gpio->reg_dir_out_base) {
277 chip->get_direction = gpio_regmap_get_direction;
278 chip->direction_input = gpio_regmap_direction_input;
279 chip->direction_output = gpio_regmap_direction_output;
280 }
281
282 ret = gpiochip_add_data(chip, gpio);
283 if (ret < 0)
284 goto err_free_gpio;
285
286 if (config->irq_domain) {
287 ret = gpiochip_irqchip_add_domain(chip, config->irq_domain);
288 if (ret)
289 goto err_remove_gpiochip;
290 }
291
292 return gpio;
293
294 err_remove_gpiochip:
295 gpiochip_remove(chip);
296 err_free_gpio:
297 kfree(gpio);
298 return ERR_PTR(ret);
299 }
300 EXPORT_SYMBOL_GPL(gpio_regmap_register);
301
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31696 bytes --]
next prev parent reply other threads:[~2021-03-20 1:47 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-06 15:56 [PATCH v5 00/15] pinctrl: add BCM63XX pincontrol support Álvaro Fernández Rojas
2021-03-06 15:56 ` Álvaro Fernández Rojas
2021-03-06 15:56 ` [PATCH v5 01/15] gpio: guard gpiochip_irqchip_add_domain() with GPIOLIB_IRQCHIP Álvaro Fernández Rojas
2021-03-06 15:56 ` Álvaro Fernández Rojas
2021-03-09 23:08 ` Michael Walle
2021-03-09 23:08 ` Michael Walle
2021-03-06 15:56 ` [PATCH v5 02/15] gpio: regmap: set gpio_chip of_node Álvaro Fernández Rojas
2021-03-06 15:56 ` Álvaro Fernández Rojas
2021-03-06 16:26 ` Andy Shevchenko
2021-03-06 16:26 ` Andy Shevchenko
2021-03-20 1:47 ` kernel test robot [this message]
2021-03-06 15:57 ` [PATCH v5 03/15] pinctrl: bcm: add bcm63xx base code Álvaro Fernández Rojas
2021-03-06 15:57 ` Álvaro Fernández Rojas
2021-03-07 19:05 ` Andy Shevchenko
2021-03-07 19:05 ` Andy Shevchenko
2021-03-10 7:25 ` Álvaro Fernández Rojas
2021-03-10 7:25 ` Álvaro Fernández Rojas
2021-03-10 23:59 ` Linus Walleij
2021-03-10 23:59 ` Linus Walleij
2021-03-06 15:57 ` [PATCH v5 04/15] dt-bindings: add BCM6328 pincontroller binding documentation Álvaro Fernández Rojas
2021-03-06 15:57 ` Álvaro Fernández Rojas
2021-03-08 22:44 ` Rob Herring
2021-03-08 22:44 ` Rob Herring
2021-03-06 15:57 ` [PATCH v5 05/15] pinctrl: add a pincontrol driver for BCM6328 Álvaro Fernández Rojas
2021-03-06 15:57 ` Álvaro Fernández Rojas
2021-03-06 15:57 ` [PATCH v5 06/15] dt-bindings: add BCM6358 pincontroller binding documentation Álvaro Fernández Rojas
2021-03-06 15:57 ` Álvaro Fernández Rojas
2021-03-06 15:57 ` [PATCH v5 07/15] pinctrl: add a pincontrol driver for BCM6358 Álvaro Fernández Rojas
2021-03-06 15:57 ` Álvaro Fernández Rojas
2021-03-06 15:57 ` [PATCH v5 08/15] dt-bindings: add BCM6362 pincontroller binding documentation Álvaro Fernández Rojas
2021-03-06 15:57 ` Álvaro Fernández Rojas
2021-03-06 15:57 ` [PATCH v5 09/15] pinctrl: add a pincontrol driver for BCM6362 Álvaro Fernández Rojas
2021-03-06 15:57 ` Álvaro Fernández Rojas
2021-03-06 15:57 ` [PATCH v5 10/15] dt-bindings: add BCM6368 pincontroller binding documentation Álvaro Fernández Rojas
2021-03-06 15:57 ` Álvaro Fernández Rojas
2021-03-06 15:57 ` [PATCH v5 11/15] pinctrl: add a pincontrol driver for BCM6368 Álvaro Fernández Rojas
2021-03-06 15:57 ` Álvaro Fernández Rojas
2021-03-06 15:57 ` [PATCH v5 12/15] dt-bindings: add BCM63268 pincontroller binding documentation Álvaro Fernández Rojas
2021-03-06 15:57 ` Álvaro Fernández Rojas
2021-03-06 15:57 ` [PATCH v5 13/15] pinctrl: add a pincontrol driver for BCM63268 Álvaro Fernández Rojas
2021-03-06 15:57 ` Álvaro Fernández Rojas
2021-03-06 15:57 ` [PATCH v5 14/15] dt-bindings: add BCM6318 pincontroller binding documentation Álvaro Fernández Rojas
2021-03-06 15:57 ` Álvaro Fernández Rojas
2021-03-08 22:50 ` Rob Herring
2021-03-08 22:50 ` Rob Herring
2021-03-06 15:57 ` [PATCH v5 15/15] pinctrl: add a pincontrol driver for BCM6318 Álvaro Fernández Rojas
2021-03-06 15:57 ` Álvaro Fernández Rojas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202103200940.N4OsEzyx-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.