Re: drivers/soundwire/bus_type.c:126:30: error: implicit declaration of function 'irq_create_mapping'; did you mean 'irq_dispose_mapping'?

From: Charles Keepax
Date: Mon Sep 18 2023 - 08:03:12 EST


On Fri, Sep 15, 2023 at 10:14:52PM -0700, Randy Dunlap wrote:
>
>
> On 9/14/23 17:26, kernel test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: 9fdfb15a3dbf818e06be514f4abbfc071004cbe7
> > commit: 12a95123bfe1dd1a6020a35f5e67a560591bb02a soundwire: bus: Allow SoundWire peripherals to register IRQ handlers
> > date: 4 weeks ago
> > config: s390-randconfig-r031-20220110 (https://download.01.org/0day-ci/archive/20230915/202309150820.6zuErL12-lkp@xxxxxxxxx/config)
> > compiler: s390-linux-gcc (GCC) 11.3.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230915/202309150820.6zuErL12-lkp@xxxxxxxxx/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@xxxxxxxxx>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202309150820.6zuErL12-lkp@xxxxxxxxx/
> >
> > All errors (new ones prefixed by >>):
> >
> > drivers/soundwire/bus_type.c: In function 'sdw_drv_probe':
> >>> drivers/soundwire/bus_type.c:126:30: error: implicit declaration of function 'irq_create_mapping'; did you mean 'irq_dispose_mapping'? [-Werror=implicit-function-declaration]
> > 126 | slave->irq = irq_create_mapping(slave->bus->domain, slave->dev_num);
> > | ^~~~~~~~~~~~~~~~~~
> > | irq_dispose_mapping
> > drivers/soundwire/bus_type.c: In function 'sdw_drv_remove':
> >>> drivers/soundwire/bus_type.c:179:37: error: implicit declaration of function 'irq_find_mapping'; did you mean 'irq_dispose_mapping'? [-Werror=implicit-function-declaration]
> > 179 | irq_dispose_mapping(irq_find_mapping(slave->bus->domain,
> > | ^~~~~~~~~~~~~~~~
> > | irq_dispose_mapping
> > cc1: some warnings being treated as errors
> > --
> > drivers/soundwire/bus.c: In function 'sdw_bus_master_add':
> >>> drivers/soundwire/bus.c:173:23: error: implicit declaration of function 'irq_domain_create_linear' [-Werror=implicit-function-declaration]
> > 173 | bus->domain = irq_domain_create_linear(fwnode, SDW_MAX_DEVICES,
> > | ^~~~~~~~~~~~~~~~~~~~~~~~
> > drivers/soundwire/bus.c:173:21: warning: assignment to 'struct irq_domain *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
> > 173 | bus->domain = irq_domain_create_linear(fwnode, SDW_MAX_DEVICES,
> > | ^
> > drivers/soundwire/bus.c: In function 'sdw_bus_master_delete':
> >>> drivers/soundwire/bus.c:217:9: error: implicit declaration of function 'irq_domain_remove' [-Werror=implicit-function-declaration]
> > 217 | irq_domain_remove(bus->domain);
> > | ^~~~~~~~~~~~~~~~~
> > cc1: some warnings being treated as errors
> >
>
> CONFIG_IRQ_DOMAIN is not set in the .config file.
> Should SOUNDWIRE select IRQ_DOMAIN?
>

Probably a reasonable fix, but I wonder if it might be better to
make my new additions optional. Since SoundWire isn't strictly
dependent on my IRQ additions.

I will have a look this afternoon at what I can get working.

Thanks,
Charles