* [PATCH v1] mfd: Remove unused of_node variables @ 2025-06-04 8:10 Baolin Liu 2025-06-04 13:48 ` kernel test robot 0 siblings, 1 reply; 3+ messages in thread From: Baolin Liu @ 2025-06-04 8:10 UTC (permalink / raw) To: lee; +Cc: linux-kernel, liubaolin12138, Baolin Liu From: Baolin Liu <liubaolin@kylinos.cn> Clean up unused device tree node variables to eliminate compiler warnings: `warning: unused variable ‘node’` No functional changes. Signed-off-by: Baolin Liu <liubaolin@kylinos.cn> --- drivers/mfd/88pm860x-core.c | 1 - drivers/mfd/max8925-core.c | 1 - drivers/mfd/twl4030-irq.c | 1 - 3 files changed, 3 deletions(-) diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c index 488e346047c1..750f9db95386 100644 --- a/drivers/mfd/88pm860x-core.c +++ b/drivers/mfd/88pm860x-core.c @@ -573,7 +573,6 @@ static int device_irq_init(struct pm860x_chip *chip, unsigned long flags = IRQF_TRIGGER_FALLING | IRQF_ONESHOT; int data, mask, ret = -EINVAL; int nr_irqs, irq_base = -1; - struct device_node *node = i2c->dev.of_node; mask = PM8607_B0_MISC1_INV_INT | PM8607_B0_MISC1_INT_CLEAR | PM8607_B0_MISC1_INT_MASK; diff --git a/drivers/mfd/max8925-core.c b/drivers/mfd/max8925-core.c index 78b16c67a5fc..9d6358337d97 100644 --- a/drivers/mfd/max8925-core.c +++ b/drivers/mfd/max8925-core.c @@ -656,7 +656,6 @@ static int max8925_irq_init(struct max8925_chip *chip, int irq, { unsigned long flags = IRQF_TRIGGER_FALLING | IRQF_ONESHOT; int ret; - struct device_node *node = chip->dev->of_node; /* clear all interrupts */ max8925_reg_read(chip->i2c, MAX8925_CHG_IRQ1); diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c index 232c2bfe8c18..c95a73186112 100644 --- a/drivers/mfd/twl4030-irq.c +++ b/drivers/mfd/twl4030-irq.c @@ -676,7 +676,6 @@ int twl4030_init_irq(struct device *dev, int irq_num) static struct irq_chip twl4030_irq_chip; int status, i; int irq_base, irq_end, nr_irqs; - struct device_node *node = dev->of_node; /* * TWL core and pwr interrupts must be contiguous because -- 2.39.2 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] mfd: Remove unused of_node variables 2025-06-04 8:10 [PATCH v1] mfd: Remove unused of_node variables Baolin Liu @ 2025-06-04 13:48 ` kernel test robot 2025-06-05 1:27 ` liubaolin 0 siblings, 1 reply; 3+ messages in thread From: kernel test robot @ 2025-06-04 13:48 UTC (permalink / raw) To: Baolin Liu, lee; +Cc: oe-kbuild-all, linux-kernel, liubaolin12138, Baolin Liu 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@intel.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 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] mfd: Remove unused of_node variables 2025-06-04 13:48 ` kernel test robot @ 2025-06-05 1:27 ` liubaolin 0 siblings, 0 replies; 3+ messages in thread From: liubaolin @ 2025-06-05 1:27 UTC (permalink / raw) To: kernel test robot, lee; +Cc: oe-kbuild-all, linux-kernel, Baolin Liu > 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@intel.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 > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-06-05 1:27 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2025-06-04 8:10 [PATCH v1] mfd: Remove unused of_node variables Baolin Liu 2025-06-04 13:48 ` kernel test robot 2025-06-05 1:27 ` liubaolin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®