[brgl:gpio/for-next 2/2] drivers/gpio/gpio-xlp.c:267:11: error: 'struct gpio_chip' has no member named 'of_node'

From: kernel test robot
Date: Fri Nov 19 2021 - 14:07:29 EST


Hi Rob,

First bad commit (maybe != root cause):

tree: https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git gpio/for-next
head: ea708ac5bf419d9735354f9deada384c1059700f
commit: ea708ac5bf419d9735354f9deada384c1059700f [2/2] gpio: xlp: Remove Netlogic XLP variants
config: ia64-randconfig-r012-20211116 (attached as .config)
compiler: ia64-linux-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git/commit/?id=ea708ac5bf419d9735354f9deada384c1059700f
git remote add brgl https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git
git fetch --no-tags brgl gpio/for-next
git checkout ea708ac5bf419d9735354f9deada384c1059700f
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/

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

All errors (new ones prefixed by >>):

drivers/gpio/gpio-xlp.c: In function 'xlp_gpio_probe':
>> drivers/gpio/gpio-xlp.c:267:11: error: 'struct gpio_chip' has no member named 'of_node'
267 | gc->of_node = pdev->dev.of_node;
| ^~
drivers/gpio/gpio-xlp.c: At top level:
>> drivers/gpio/gpio-xlp.c:300:23: error: 'GPIO_VARIANT_VULCAN' undeclared here (not in a function)
300 | { "BRCM9006", GPIO_VARIANT_VULCAN },
| ^~~~~~~~~~~~~~~~~~~


vim +267 drivers/gpio/gpio-xlp.c

ff718800067952 Kamlakant Patel 2015-04-28 230
ff718800067952 Kamlakant Patel 2015-04-28 231 static int xlp_gpio_probe(struct platform_device *pdev)
ff718800067952 Kamlakant Patel 2015-04-28 232 {
ff718800067952 Kamlakant Patel 2015-04-28 233 struct gpio_chip *gc;
c7e66e48c05ac2 Linus Walleij 2019-08-09 234 struct gpio_irq_chip *girq;
ff718800067952 Kamlakant Patel 2015-04-28 235 struct xlp_gpio_priv *priv;
ff718800067952 Kamlakant Patel 2015-04-28 236 void __iomem *gpio_base;
ea708ac5bf419d Rob Herring 2021-11-09 237 int irq, err;
ff718800067952 Kamlakant Patel 2015-04-28 238
ff718800067952 Kamlakant Patel 2015-04-28 239 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
ff718800067952 Kamlakant Patel 2015-04-28 240 if (!priv)
ff718800067952 Kamlakant Patel 2015-04-28 241 return -ENOMEM;
ff718800067952 Kamlakant Patel 2015-04-28 242
3883de0287d0b9 Enrico Weigelt, metux IT consult 2019-03-11 243 gpio_base = devm_platform_ioremap_resource(pdev, 0);
ff718800067952 Kamlakant Patel 2015-04-28 244 if (IS_ERR(gpio_base))
ff718800067952 Kamlakant Patel 2015-04-28 245 return PTR_ERR(gpio_base);
ff718800067952 Kamlakant Patel 2015-04-28 246
ff718800067952 Kamlakant Patel 2015-04-28 247 irq = platform_get_irq(pdev, 0);
ff718800067952 Kamlakant Patel 2015-04-28 248 if (irq < 0)
ff718800067952 Kamlakant Patel 2015-04-28 249 return irq;
ff718800067952 Kamlakant Patel 2015-04-28 250
ff718800067952 Kamlakant Patel 2015-04-28 251 priv->gpio_out_en = gpio_base + GPIO_9XX_OUTPUT_EN;
ff718800067952 Kamlakant Patel 2015-04-28 252 priv->gpio_paddrv = gpio_base + GPIO_9XX_PADDRV;
ff718800067952 Kamlakant Patel 2015-04-28 253 priv->gpio_intr_stat = gpio_base + GPIO_9XX_INT_STAT;
ff718800067952 Kamlakant Patel 2015-04-28 254 priv->gpio_intr_type = gpio_base + GPIO_9XX_INT_TYPE;
ff718800067952 Kamlakant Patel 2015-04-28 255 priv->gpio_intr_pol = gpio_base + GPIO_9XX_INT_POL;
ff718800067952 Kamlakant Patel 2015-04-28 256 priv->gpio_intr_en = gpio_base + GPIO_9XX_INT_EN00;
ff718800067952 Kamlakant Patel 2015-04-28 257
ff718800067952 Kamlakant Patel 2015-04-28 258 bitmap_zero(priv->gpio_enabled_mask, XLP_MAX_NR_GPIO);
ff718800067952 Kamlakant Patel 2015-04-28 259
ff718800067952 Kamlakant Patel 2015-04-28 260 gc = &priv->chip;
ff718800067952 Kamlakant Patel 2015-04-28 261
b8a3f52e982484 Axel Lin 2015-05-07 262 gc->owner = THIS_MODULE;
b8a3f52e982484 Axel Lin 2015-05-07 263 gc->label = dev_name(&pdev->dev);
ff718800067952 Kamlakant Patel 2015-04-28 264 gc->base = 0;
58383c78425e4e Linus Walleij 2015-11-04 265 gc->parent = &pdev->dev;
ea708ac5bf419d Rob Herring 2021-11-09 266 gc->ngpio = 70;
ff718800067952 Kamlakant Patel 2015-04-28 @267 gc->of_node = pdev->dev.of_node;
ff718800067952 Kamlakant Patel 2015-04-28 268 gc->direction_output = xlp_gpio_dir_output;
ff718800067952 Kamlakant Patel 2015-04-28 269 gc->direction_input = xlp_gpio_dir_input;
ff718800067952 Kamlakant Patel 2015-04-28 270 gc->set = xlp_gpio_set;
ff718800067952 Kamlakant Patel 2015-04-28 271 gc->get = xlp_gpio_get;
ff718800067952 Kamlakant Patel 2015-04-28 272
ff718800067952 Kamlakant Patel 2015-04-28 273 spin_lock_init(&priv->lock);
1630a0624a1b8e Kamlakant Patel 2016-06-05 274
c7e66e48c05ac2 Linus Walleij 2019-08-09 275 girq = &gc->irq;
c7e66e48c05ac2 Linus Walleij 2019-08-09 276 girq->chip = &xlp_gpio_irq_chip;
c7e66e48c05ac2 Linus Walleij 2019-08-09 277 girq->parent_handler = xlp_gpio_generic_handler;
c7e66e48c05ac2 Linus Walleij 2019-08-09 278 girq->num_parents = 1;
c7e66e48c05ac2 Linus Walleij 2019-08-09 279 girq->parents = devm_kcalloc(&pdev->dev, 1,
c7e66e48c05ac2 Linus Walleij 2019-08-09 280 sizeof(*girq->parents),
c7e66e48c05ac2 Linus Walleij 2019-08-09 281 GFP_KERNEL);
c7e66e48c05ac2 Linus Walleij 2019-08-09 282 if (!girq->parents)
c7e66e48c05ac2 Linus Walleij 2019-08-09 283 return -ENOMEM;
c7e66e48c05ac2 Linus Walleij 2019-08-09 284 girq->parents[0] = irq;
ea708ac5bf419d Rob Herring 2021-11-09 285 girq->first = 0;
c7e66e48c05ac2 Linus Walleij 2019-08-09 286 girq->default_type = IRQ_TYPE_NONE;
c7e66e48c05ac2 Linus Walleij 2019-08-09 287 girq->handler = handle_level_irq;
c7e66e48c05ac2 Linus Walleij 2019-08-09 288
e730a5953af4c5 Linus Walleij 2015-12-07 289 err = gpiochip_add_data(gc, priv);
ff718800067952 Kamlakant Patel 2015-04-28 290 if (err < 0)
31bd86d9834fc1 Bartosz Golaszewski 2017-03-04 291 return err;
ff718800067952 Kamlakant Patel 2015-04-28 292
ff718800067952 Kamlakant Patel 2015-04-28 293 dev_info(&pdev->dev, "registered %d GPIOs\n", gc->ngpio);
ff718800067952 Kamlakant Patel 2015-04-28 294
ff718800067952 Kamlakant Patel 2015-04-28 295 return 0;
ff718800067952 Kamlakant Patel 2015-04-28 296 }
ff718800067952 Kamlakant Patel 2015-04-28 297
baa1b920a84081 Kamlakant Patel 2016-06-05 298 #ifdef CONFIG_ACPI
baa1b920a84081 Kamlakant Patel 2016-06-05 299 static const struct acpi_device_id xlp_gpio_acpi_match[] = {
baa1b920a84081 Kamlakant Patel 2016-06-05 @300 { "BRCM9006", GPIO_VARIANT_VULCAN },
529f75d8ca214a Jayachandran C 2017-03-12 301 { "CAV9006", GPIO_VARIANT_VULCAN },
baa1b920a84081 Kamlakant Patel 2016-06-05 302 {},
baa1b920a84081 Kamlakant Patel 2016-06-05 303 };
baa1b920a84081 Kamlakant Patel 2016-06-05 304 MODULE_DEVICE_TABLE(acpi, xlp_gpio_acpi_match);
baa1b920a84081 Kamlakant Patel 2016-06-05 305 #endif
baa1b920a84081 Kamlakant Patel 2016-06-05 306

:::::: The code at line 267 was first introduced by commit
:::::: ff71880006795290f371caae13e740491ec76956 gpio: xlp: GPIO controller for Netlogic XLP SoCs

:::::: TO: Kamlakant Patel <kamlakant.patel@xxxxxxxxxxxx>
:::::: CC: Linus Walleij <linus.walleij@xxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip