[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4ea563c6-0d77-4a5c-95ff-8821552ad5d7@163.com>
Date: Thu, 5 Jun 2025 09:27:07 +0800
From: liubaolin <liubaolin12138@....com>
To: kernel test robot <lkp@...el.com>, lee@...nel.org
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Baolin Liu <liubaolin@...inos.cn>
Subject: Re: [PATCH v1] mfd: Remove unused of_node variables
> My apologies - I submitted this patch to address compilation warnings,
> “drivers/mfd/88pm860x-core.c: In function ‘device_irq_init’:
> drivers/mfd/88pm860x-core.c:576:29: warning: unused variable ‘node’ [-Wunused-variable]
> | struct device_node *node = i2c->dev.of_node;
> | ^~~~
>
> drivers/mfd/twl4030-irq.c: In function ‘twl4030_init_irq’:
> 679 | struct device_node *node = dev->of_node;
> | ^~~~
>
> drivers/mfd/max8925-core.c: In function ‘max8925_irq_init’:
> drivers/mfd/max8925-core.c:659:29: warning: unused variable ‘node’ [-Wunused-variable]
> 659 | struct device_node *node = chip->dev->of_node;
> | ”
> but it appears they were false positives as the node is actually used via 'of_fwnode_handle(node)'.
> Please discard this patch and cancel the review. Sorry for the inconvenience.
在 2025/6/4 21:48, kernel test robot 写道:
> Hi Baolin,
>
> kernel test robot noticed the following build errors:
>
> [auto build test ERROR on lee-mfd/for-mfd-next]
> [also build test ERROR on lee-leds/for-leds-next lee-mfd/for-mfd-fixes tmlind-omap/for-next linus/master v6.15 next-20250604]
> [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#_base_tree_information]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Baolin-Liu/mfd-Remove-unused-of_node-variables/20250604-161317
> base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
> patch link: https://lore.kernel.org/r/20250604081043.802659-1-liubaolin12138%40163.com
> patch subject: [PATCH v1] mfd: Remove unused of_node variables
> config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20250604/202506042124.mV2W3XrQ-lkp@intel.com/config)
> compiler: alpha-linux-gcc (GCC) 15.1.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250604/202506042124.mV2W3XrQ-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@...el.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202506042124.mV2W3XrQ-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> drivers/mfd/88pm860x-core.c: In function 'device_irq_init':
>>> drivers/mfd/88pm860x-core.c:626:31: error: 'node' undeclared (first use in this function)
> 626 | irq_domain_add_legacy(node, nr_irqs, chip->irq_base, 0,
> | ^~~~
> drivers/mfd/88pm860x-core.c:626:31: note: each undeclared identifier is reported only once for each function it appears in
> --
> drivers/mfd/twl4030-irq.c: In function 'twl4030_init_irq':
>>> drivers/mfd/twl4030-irq.c:693:31: error: 'node' undeclared (first use in this function); did you mean 'inode'?
> 693 | irq_domain_add_legacy(node, nr_irqs, irq_base, 0,
> | ^~~~
> | inode
> drivers/mfd/twl4030-irq.c:693:31: note: each undeclared identifier is reported only once for each function it appears in
> --
> drivers/mfd/max8925-core.c: In function 'max8925_irq_init':
>>> drivers/mfd/max8925-core.c:684:31: error: 'node' undeclared (first use in this function)
> 684 | irq_domain_add_legacy(node, MAX8925_NR_IRQS, chip->irq_base, 0,
> | ^~~~
> drivers/mfd/max8925-core.c:684:31: note: each undeclared identifier is reported only once for each function it appears in
>
>
> vim +/node +626 drivers/mfd/88pm860x-core.c
>
> 837c8293ba24d0 Haojian Zhuang 2012-10-02 566
> f791be492f76de Bill Pemberton 2012-11-19 567 static int device_irq_init(struct pm860x_chip *chip,
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 568 struct pm860x_platform_data *pdata)
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 569 {
> 2e57848fed7435 Lee Jones 2014-05-08 570 struct i2c_client *i2c = (chip->id == CHIP_PM8607) ?
> 2e57848fed7435 Lee Jones 2014-05-08 571 chip->client : chip->companion;
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 572 unsigned char status_buf[INT_STATUS_NUM];
> 2afa62ea76027b Haojian Zhuang 2010-02-08 573 unsigned long flags = IRQF_TRIGGER_FALLING | IRQF_ONESHOT;
> 837c8293ba24d0 Haojian Zhuang 2012-10-02 574 int data, mask, ret = -EINVAL;
> 837c8293ba24d0 Haojian Zhuang 2012-10-02 575 int nr_irqs, irq_base = -1;
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 576
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 577 mask = PM8607_B0_MISC1_INV_INT | PM8607_B0_MISC1_INT_CLEAR
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 578 | PM8607_B0_MISC1_INT_MASK;
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 579 data = 0;
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 580 chip->irq_mode = 0;
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 581 if (pdata && pdata->irq_mode) {
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 582 /*
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 583 * irq_mode defines the way of clearing interrupt. If it's 1,
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 584 * clear IRQ by write. Otherwise, clear it by read.
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 585 * This control bit is valid from 88PM8607 B0 steping.
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 586 */
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 587 data |= PM8607_B0_MISC1_INT_CLEAR;
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 588 chip->irq_mode = 1;
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 589 }
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 590 ret = pm860x_set_bits(i2c, PM8607_B0_MISC1, mask, data);
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 591 if (ret < 0)
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 592 goto out;
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 593
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 594 /* mask all IRQs */
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 595 memset(status_buf, 0, INT_STATUS_NUM);
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 596 ret = pm860x_bulk_write(i2c, PM8607_INT_MASK_1,
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 597 INT_STATUS_NUM, status_buf);
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 598 if (ret < 0)
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 599 goto out;
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 600
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 601 if (chip->irq_mode) {
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 602 /* clear interrupt status by write */
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 603 memset(status_buf, 0xFF, INT_STATUS_NUM);
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 604 ret = pm860x_bulk_write(i2c, PM8607_INT_STATUS1,
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 605 INT_STATUS_NUM, status_buf);
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 606 } else {
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 607 /* clear interrupt status by read */
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 608 ret = pm860x_bulk_read(i2c, PM8607_INT_STATUS1,
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 609 INT_STATUS_NUM, status_buf);
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 610 }
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 611 if (ret < 0)
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 612 goto out;
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 613
> 2afa62ea76027b Haojian Zhuang 2010-02-08 614 mutex_init(&chip->irq_lock);
> 837c8293ba24d0 Haojian Zhuang 2012-10-02 615
> 837c8293ba24d0 Haojian Zhuang 2012-10-02 616 if (pdata && pdata->irq_base)
> 837c8293ba24d0 Haojian Zhuang 2012-10-02 617 irq_base = pdata->irq_base;
> 837c8293ba24d0 Haojian Zhuang 2012-10-02 618 nr_irqs = ARRAY_SIZE(pm860x_irqs);
> 837c8293ba24d0 Haojian Zhuang 2012-10-02 619 chip->irq_base = irq_alloc_descs(irq_base, 0, nr_irqs, 0);
> 837c8293ba24d0 Haojian Zhuang 2012-10-02 620 if (chip->irq_base < 0) {
> 837c8293ba24d0 Haojian Zhuang 2012-10-02 621 dev_err(&i2c->dev, "Failed to allocate interrupts, ret:%d\n",
> 837c8293ba24d0 Haojian Zhuang 2012-10-02 622 chip->irq_base);
> 837c8293ba24d0 Haojian Zhuang 2012-10-02 623 ret = -EBUSY;
> 837c8293ba24d0 Haojian Zhuang 2012-10-02 624 goto out;
> 837c8293ba24d0 Haojian Zhuang 2012-10-02 625 }
> 837c8293ba24d0 Haojian Zhuang 2012-10-02 @626 irq_domain_add_legacy(node, nr_irqs, chip->irq_base, 0,
> 837c8293ba24d0 Haojian Zhuang 2012-10-02 627 &pm860x_irq_domain_ops, chip);
> 2afa62ea76027b Haojian Zhuang 2010-02-08 628 chip->core_irq = i2c->irq;
> 2afa62ea76027b Haojian Zhuang 2010-02-08 629 if (!chip->core_irq)
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 630 goto out;
> 2afa62ea76027b Haojian Zhuang 2010-02-08 631
> 2e57848fed7435 Lee Jones 2014-05-08 632 ret = request_threaded_irq(chip->core_irq, NULL, pm860x_irq,
> 2e57848fed7435 Lee Jones 2014-05-08 633 flags | IRQF_ONESHOT, "88pm860x", chip);
> 2afa62ea76027b Haojian Zhuang 2010-02-08 634 if (ret) {
> 2afa62ea76027b Haojian Zhuang 2010-02-08 635 dev_err(chip->dev, "Failed to request IRQ: %d\n", ret);
> 2afa62ea76027b Haojian Zhuang 2010-02-08 636 chip->core_irq = 0;
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 637 }
> 2afa62ea76027b Haojian Zhuang 2010-02-08 638
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 639 return 0;
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 640 out:
> 2afa62ea76027b Haojian Zhuang 2010-02-08 641 chip->core_irq = 0;
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 642 return ret;
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 643 }
> 5c42e8c4a9c86e Haojian Zhuang 2009-12-15 644
>
Powered by blists - more mailing lists