Re: [PATCH v2 3/6] i2c: core: Switch to fwnode APIs to get IRQ

kernel test robot
2025-04-07T13:48:44Z

Hi Andy,

kernel test robot noticed the following build errors:

[auto build test ERROR on wsa/i2c/for-next]
[also build test ERROR on linus/master v6.15-rc1 next-20250407]
[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/Andy-Shevchenko/i2c-core-Drop-duplicate-check-before-calling-OF-APIs/20250407-180528
base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
patch link: https://lore.kernel.org/r/20250407095852.215809-4-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH v2 3/6] i2c: core: Switch to fwnode APIs to get IRQ
config: i386-buildonly-randconfig-002-20250407 (https://download.01.org/0day-ci/archive/20250407/202504072135.1Uy3AQ3g-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250407/202504072135.1Uy3AQ3g-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/202504072135.1Uy3AQ3g-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

drivers/i2c/i2c-core-base.c: In function 'i2c_dev_irq_from_resources':
>> drivers/i2c/i2c-core-base.c:911:32: error: implicit declaration of function 'irq_get_irq_data'; did you mean 'irq_set_irq_wake'? [-Werror=implicit-function-declaration]
911 | irqd = irq_get_irq_data(r->start);
| ^~~~~~~~~~~~~~~~
| irq_set_irq_wake
>> drivers/i2c/i2c-core-base.c:911:30: warning: assignment to 'struct irq_data *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
911 | irqd = irq_get_irq_data(r->start);
| ^
>> drivers/i2c/i2c-core-base.c:915:25: error: implicit declaration of function 'irqd_set_trigger_type' [-Werror=implicit-function-declaration]
915 | irqd_set_trigger_type(irqd, r->flags & IORESOURCE_BITS);
| ^~~~~~~~~~~~~~~~~~~~~
drivers/i2c/i2c-core-base.c: In function 'i2c_host_notify_irq_map':
>> drivers/i2c/i2c-core-base.c:1458:9: error: implicit declaration of function 'irq_set_chip_and_handler' [-Werror=implicit-function-declaration]
1458 | irq_set_chip_and_handler(virq, &dummy_irq_chip, handle_simple_irq);
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/i2c/i2c-core-base.c:1458:41: error: 'dummy_irq_chip' undeclared (first use in this function)
1458 | irq_set_chip_and_handler(virq, &dummy_irq_chip, handle_simple_irq);
| ^~~~~~~~~~~~~~
drivers/i2c/i2c-core-base.c:1458:41: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/i2c/i2c-core-base.c:1458:57: error: 'handle_simple_irq' undeclared (first use in this function)
1458 | irq_set_chip_and_handler(virq, &dummy_irq_chip, handle_simple_irq);
| ^~~~~~~~~~~~~~~~~
drivers/i2c/i2c-core-base.c: In function 'i2c_handle_smbus_host_notify':
>> drivers/i2c/i2c-core-base.c:1508:9: error: implicit declaration of function 'generic_handle_irq_safe' [-Werror=implicit-function-declaration]
1508 | generic_handle_irq_safe(irq);
| ^~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

vim +911 drivers/i2c/i2c-core-base.c

70762abb9f89d97 drivers/i2c/i2c-core.c Jarkko Nikula 2013-11-14 897
1d7534b6adcd3e4 drivers/i2c/i2c-core-base.c Charles Keepax 2019-06-27 898 int i2c_dev_irq_from_resources(const struct resource *resources,
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 899 unsigned int num_resources)
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 900 {
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 901 struct irq_data *irqd;
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 902 int i;
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 903
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 904 for (i = 0; i < num_resources; i++) {
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 905 const struct resource *r = &resources[i];
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 906
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 907 if (resource_type(r) != IORESOURCE_IRQ)
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 908 continue;
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 909
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 910 if (r->flags & IORESOURCE_BITS) {
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 @911 irqd = irq_get_irq_data(r->start);
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 912 if (!irqd)
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 913 break;
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 914
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 @915 irqd_set_trigger_type(irqd, r->flags & IORESOURCE_BITS);
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 916 }
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 917
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 918 return r->start;
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 919 }
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 920
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 921 return 0;
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 922 }
4124c4eba40256b drivers/i2c/i2c-core.c Dmitry Torokhov 2017-03-01 923

--
0-DAY CI Kernel Test Service