public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* drivers/soundwire/bus_type.c:126:30: error: implicit declaration of function 'irq_create_mapping'; did you mean 'irq_dispose_mapping'?
@ 2023-09-15  0:26 kernel test robot
  2023-09-16  5:14 ` Randy Dunlap
  0 siblings, 1 reply; 5+ messages in thread
From: kernel test robot @ 2023-09-15  0:26 UTC (permalink / raw)
  To: Lucas Tanure
  Cc: oe-kbuild-all, linux-kernel, Lee Jones, Pierre-Louis Bossart,
	Charles Keepax

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@intel.com/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@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/202309150820.6zuErL12-lkp@intel.com/

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


vim +126 drivers/soundwire/bus_type.c

    79	
    80	static int sdw_drv_probe(struct device *dev)
    81	{
    82		struct sdw_slave *slave = dev_to_sdw_dev(dev);
    83		struct sdw_driver *drv = drv_to_sdw_driver(dev->driver);
    84		const struct sdw_device_id *id;
    85		const char *name;
    86		int ret;
    87	
    88		/*
    89		 * fw description is mandatory to bind
    90		 */
    91		if (!dev->fwnode)
    92			return -ENODEV;
    93	
    94		if (!IS_ENABLED(CONFIG_ACPI) && !dev->of_node)
    95			return -ENODEV;
    96	
    97		id = sdw_get_device_id(slave, drv);
    98		if (!id)
    99			return -ENODEV;
   100	
   101		/*
   102		 * attach to power domain but don't turn on (last arg)
   103		 */
   104		ret = dev_pm_domain_attach(dev, false);
   105		if (ret)
   106			return ret;
   107	
   108		ret = drv->probe(slave, id);
   109		if (ret) {
   110			name = drv->name;
   111			if (!name)
   112				name = drv->driver.name;
   113	
   114			dev_err(dev, "Probe of %s failed: %d\n", name, ret);
   115			dev_pm_domain_detach(dev, false);
   116			return ret;
   117		}
   118	
   119		mutex_lock(&slave->sdw_dev_lock);
   120	
   121		/* device is probed so let's read the properties now */
   122		if (drv->ops && drv->ops->read_prop)
   123			drv->ops->read_prop(slave);
   124	
   125		if (slave->prop.use_domain_irq) {
 > 126			slave->irq = irq_create_mapping(slave->bus->domain, slave->dev_num);
   127			if (!slave->irq)
   128				dev_warn(dev, "Failed to map IRQ\n");
   129		}
   130	
   131		/* init the sysfs as we have properties now */
   132		ret = sdw_slave_sysfs_init(slave);
   133		if (ret < 0)
   134			dev_warn(dev, "Slave sysfs init failed:%d\n", ret);
   135	
   136		/*
   137		 * Check for valid clk_stop_timeout, use DisCo worst case value of
   138		 * 300ms
   139		 *
   140		 * TODO: check the timeouts and driver removal case
   141		 */
   142		if (slave->prop.clk_stop_timeout == 0)
   143			slave->prop.clk_stop_timeout = 300;
   144	
   145		slave->bus->clk_stop_timeout = max_t(u32, slave->bus->clk_stop_timeout,
   146						     slave->prop.clk_stop_timeout);
   147	
   148		slave->probed = true;
   149	
   150		/*
   151		 * if the probe happened after the bus was started, notify the codec driver
   152		 * of the current hardware status to e.g. start the initialization.
   153		 * Errors are only logged as warnings to avoid failing the probe.
   154		 */
   155		if (drv->ops && drv->ops->update_status) {
   156			ret = drv->ops->update_status(slave, slave->status);
   157			if (ret < 0)
   158				dev_warn(dev, "%s: update_status failed with status %d\n", __func__, ret);
   159		}
   160	
   161		mutex_unlock(&slave->sdw_dev_lock);
   162	
   163		dev_dbg(dev, "probe complete\n");
   164	
   165		return 0;
   166	}
   167	
   168	static int sdw_drv_remove(struct device *dev)
   169	{
   170		struct sdw_slave *slave = dev_to_sdw_dev(dev);
   171		struct sdw_driver *drv = drv_to_sdw_driver(dev->driver);
   172		int ret = 0;
   173	
   174		mutex_lock(&slave->sdw_dev_lock);
   175	
   176		slave->probed = false;
   177	
   178		if (slave->prop.use_domain_irq)
 > 179			irq_dispose_mapping(irq_find_mapping(slave->bus->domain,
   180							     slave->dev_num));
   181	
   182		mutex_unlock(&slave->sdw_dev_lock);
   183	
   184		if (drv->remove)
   185			ret = drv->remove(slave);
   186	
   187		dev_pm_domain_detach(dev, false);
   188	
   189		return ret;
   190	}
   191	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: drivers/soundwire/bus_type.c:126:30: error: implicit declaration of function 'irq_create_mapping'; did you mean 'irq_dispose_mapping'?
  2023-09-15  0:26 drivers/soundwire/bus_type.c:126:30: error: implicit declaration of function 'irq_create_mapping'; did you mean 'irq_dispose_mapping'? kernel test robot
@ 2023-09-16  5:14 ` Randy Dunlap
  2023-09-18 12:01   ` Charles Keepax
  0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2023-09-16  5:14 UTC (permalink / raw)
  To: kernel test robot, Lucas Tanure
  Cc: oe-kbuild-all, linux-kernel, Lee Jones, Pierre-Louis Bossart,
	Charles Keepax



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@intel.com/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@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/202309150820.6zuErL12-lkp@intel.com/
> 
> 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?

> 
> vim +126 drivers/soundwire/bus_type.c
> 
>     79	
>     80	static int sdw_drv_probe(struct device *dev)
>     81	{
>     82		struct sdw_slave *slave = dev_to_sdw_dev(dev);
>     83		struct sdw_driver *drv = drv_to_sdw_driver(dev->driver);
>     84		const struct sdw_device_id *id;
>     85		const char *name;
>     86		int ret;
>     87	
>     88		/*
>     89		 * fw description is mandatory to bind
>     90		 */
>     91		if (!dev->fwnode)
>     92			return -ENODEV;
>     93	
>     94		if (!IS_ENABLED(CONFIG_ACPI) && !dev->of_node)
>     95			return -ENODEV;
>     96	
>     97		id = sdw_get_device_id(slave, drv);
>     98		if (!id)
>     99			return -ENODEV;
>    100	
>    101		/*
>    102		 * attach to power domain but don't turn on (last arg)
>    103		 */
>    104		ret = dev_pm_domain_attach(dev, false);
>    105		if (ret)
>    106			return ret;
>    107	
>    108		ret = drv->probe(slave, id);
>    109		if (ret) {
>    110			name = drv->name;
>    111			if (!name)
>    112				name = drv->driver.name;
>    113	
>    114			dev_err(dev, "Probe of %s failed: %d\n", name, ret);
>    115			dev_pm_domain_detach(dev, false);
>    116			return ret;
>    117		}
>    118	
>    119		mutex_lock(&slave->sdw_dev_lock);
>    120	
>    121		/* device is probed so let's read the properties now */
>    122		if (drv->ops && drv->ops->read_prop)
>    123			drv->ops->read_prop(slave);
>    124	
>    125		if (slave->prop.use_domain_irq) {
>  > 126			slave->irq = irq_create_mapping(slave->bus->domain, slave->dev_num);
>    127			if (!slave->irq)
>    128				dev_warn(dev, "Failed to map IRQ\n");
>    129		}
>    130	
>    131		/* init the sysfs as we have properties now */
>    132		ret = sdw_slave_sysfs_init(slave);
>    133		if (ret < 0)
>    134			dev_warn(dev, "Slave sysfs init failed:%d\n", ret);
>    135	
>    136		/*
>    137		 * Check for valid clk_stop_timeout, use DisCo worst case value of
>    138		 * 300ms
>    139		 *
>    140		 * TODO: check the timeouts and driver removal case
>    141		 */
>    142		if (slave->prop.clk_stop_timeout == 0)
>    143			slave->prop.clk_stop_timeout = 300;
>    144	
>    145		slave->bus->clk_stop_timeout = max_t(u32, slave->bus->clk_stop_timeout,
>    146						     slave->prop.clk_stop_timeout);
>    147	
>    148		slave->probed = true;
>    149	
>    150		/*
>    151		 * if the probe happened after the bus was started, notify the codec driver
>    152		 * of the current hardware status to e.g. start the initialization.
>    153		 * Errors are only logged as warnings to avoid failing the probe.
>    154		 */
>    155		if (drv->ops && drv->ops->update_status) {
>    156			ret = drv->ops->update_status(slave, slave->status);
>    157			if (ret < 0)
>    158				dev_warn(dev, "%s: update_status failed with status %d\n", __func__, ret);
>    159		}
>    160	
>    161		mutex_unlock(&slave->sdw_dev_lock);
>    162	
>    163		dev_dbg(dev, "probe complete\n");
>    164	
>    165		return 0;
>    166	}
>    167	
>    168	static int sdw_drv_remove(struct device *dev)
>    169	{
>    170		struct sdw_slave *slave = dev_to_sdw_dev(dev);
>    171		struct sdw_driver *drv = drv_to_sdw_driver(dev->driver);
>    172		int ret = 0;
>    173	
>    174		mutex_lock(&slave->sdw_dev_lock);
>    175	
>    176		slave->probed = false;
>    177	
>    178		if (slave->prop.use_domain_irq)
>  > 179			irq_dispose_mapping(irq_find_mapping(slave->bus->domain,
>    180							     slave->dev_num));
>    181	
>    182		mutex_unlock(&slave->sdw_dev_lock);
>    183	
>    184		if (drv->remove)
>    185			ret = drv->remove(slave);
>    186	
>    187		dev_pm_domain_detach(dev, false);
>    188	
>    189		return ret;
>    190	}
>    191	
> 

-- 
~Randy

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: drivers/soundwire/bus_type.c:126:30: error: implicit declaration of function 'irq_create_mapping'; did you mean 'irq_dispose_mapping'?
  2023-09-16  5:14 ` Randy Dunlap
@ 2023-09-18 12:01   ` Charles Keepax
  0 siblings, 0 replies; 5+ messages in thread
From: Charles Keepax @ 2023-09-18 12:01 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: kernel test robot, Lucas Tanure, oe-kbuild-all, linux-kernel,
	Lee Jones, Pierre-Louis Bossart

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@intel.com/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@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/202309150820.6zuErL12-lkp@intel.com/
> > 
> > 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* drivers/soundwire/bus_type.c:126:30: error: implicit declaration of function 'irq_create_mapping'; did you mean 'irq_dispose_mapping'?
@ 2023-09-29 13:08 kernel test robot
  2023-10-02  8:55 ` Charles Keepax
  0 siblings, 1 reply; 5+ messages in thread
From: kernel test robot @ 2023-09-29 13:08 UTC (permalink / raw)
  To: Lucas Tanure
  Cc: oe-kbuild-all, linux-kernel, Lee Jones, Pierre-Louis Bossart,
	Charles Keepax

Hi Lucas,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   9ed22ae6be817d7a3f5c15ca22cbc9d3963b481d
commit: 12a95123bfe1dd1a6020a35f5e67a560591bb02a soundwire: bus: Allow SoundWire peripherals to register IRQ handlers
date:   6 weeks ago
config: s390-randconfig-r031-20221019 (https://download.01.org/0day-ci/archive/20230929/202309292102.R2ui2IV9-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230929/202309292102.R2ui2IV9-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/202309292102.R2ui2IV9-lkp@intel.com/

All error/warnings (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


vim +126 drivers/soundwire/bus_type.c

    79	
    80	static int sdw_drv_probe(struct device *dev)
    81	{
    82		struct sdw_slave *slave = dev_to_sdw_dev(dev);
    83		struct sdw_driver *drv = drv_to_sdw_driver(dev->driver);
    84		const struct sdw_device_id *id;
    85		const char *name;
    86		int ret;
    87	
    88		/*
    89		 * fw description is mandatory to bind
    90		 */
    91		if (!dev->fwnode)
    92			return -ENODEV;
    93	
    94		if (!IS_ENABLED(CONFIG_ACPI) && !dev->of_node)
    95			return -ENODEV;
    96	
    97		id = sdw_get_device_id(slave, drv);
    98		if (!id)
    99			return -ENODEV;
   100	
   101		/*
   102		 * attach to power domain but don't turn on (last arg)
   103		 */
   104		ret = dev_pm_domain_attach(dev, false);
   105		if (ret)
   106			return ret;
   107	
   108		ret = drv->probe(slave, id);
   109		if (ret) {
   110			name = drv->name;
   111			if (!name)
   112				name = drv->driver.name;
   113	
   114			dev_err(dev, "Probe of %s failed: %d\n", name, ret);
   115			dev_pm_domain_detach(dev, false);
   116			return ret;
   117		}
   118	
   119		mutex_lock(&slave->sdw_dev_lock);
   120	
   121		/* device is probed so let's read the properties now */
   122		if (drv->ops && drv->ops->read_prop)
   123			drv->ops->read_prop(slave);
   124	
   125		if (slave->prop.use_domain_irq) {
 > 126			slave->irq = irq_create_mapping(slave->bus->domain, slave->dev_num);
   127			if (!slave->irq)
   128				dev_warn(dev, "Failed to map IRQ\n");
   129		}
   130	
   131		/* init the sysfs as we have properties now */
   132		ret = sdw_slave_sysfs_init(slave);
   133		if (ret < 0)
   134			dev_warn(dev, "Slave sysfs init failed:%d\n", ret);
   135	
   136		/*
   137		 * Check for valid clk_stop_timeout, use DisCo worst case value of
   138		 * 300ms
   139		 *
   140		 * TODO: check the timeouts and driver removal case
   141		 */
   142		if (slave->prop.clk_stop_timeout == 0)
   143			slave->prop.clk_stop_timeout = 300;
   144	
   145		slave->bus->clk_stop_timeout = max_t(u32, slave->bus->clk_stop_timeout,
   146						     slave->prop.clk_stop_timeout);
   147	
   148		slave->probed = true;
   149	
   150		/*
   151		 * if the probe happened after the bus was started, notify the codec driver
   152		 * of the current hardware status to e.g. start the initialization.
   153		 * Errors are only logged as warnings to avoid failing the probe.
   154		 */
   155		if (drv->ops && drv->ops->update_status) {
   156			ret = drv->ops->update_status(slave, slave->status);
   157			if (ret < 0)
   158				dev_warn(dev, "%s: update_status failed with status %d\n", __func__, ret);
   159		}
   160	
   161		mutex_unlock(&slave->sdw_dev_lock);
   162	
   163		dev_dbg(dev, "probe complete\n");
   164	
   165		return 0;
   166	}
   167	
   168	static int sdw_drv_remove(struct device *dev)
   169	{
   170		struct sdw_slave *slave = dev_to_sdw_dev(dev);
   171		struct sdw_driver *drv = drv_to_sdw_driver(dev->driver);
   172		int ret = 0;
   173	
   174		mutex_lock(&slave->sdw_dev_lock);
   175	
   176		slave->probed = false;
   177	
   178		if (slave->prop.use_domain_irq)
 > 179			irq_dispose_mapping(irq_find_mapping(slave->bus->domain,
   180							     slave->dev_num));
   181	
   182		mutex_unlock(&slave->sdw_dev_lock);
   183	
   184		if (drv->remove)
   185			ret = drv->remove(slave);
   186	
   187		dev_pm_domain_detach(dev, false);
   188	
   189		return ret;
   190	}
   191	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: drivers/soundwire/bus_type.c:126:30: error: implicit declaration of function 'irq_create_mapping'; did you mean 'irq_dispose_mapping'?
  2023-09-29 13:08 kernel test robot
@ 2023-10-02  8:55 ` Charles Keepax
  0 siblings, 0 replies; 5+ messages in thread
From: Charles Keepax @ 2023-10-02  8:55 UTC (permalink / raw)
  To: kernel test robot
  Cc: Lucas Tanure, oe-kbuild-all, linux-kernel, Lee Jones,
	Pierre-Louis Bossart

On Fri, Sep 29, 2023 at 09:08:54PM +0800, kernel test robot wrote:
> Hi Lucas,
> 
> FYI, the error/warning still remains.
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   9ed22ae6be817d7a3f5c15ca22cbc9d3963b481d
> commit: 12a95123bfe1dd1a6020a35f5e67a560591bb02a soundwire: bus: Allow SoundWire peripherals to register IRQ handlers
> date:   6 weeks ago
> config: s390-randconfig-r031-20221019 (https://download.01.org/0day-ci/archive/20230929/202309292102.R2ui2IV9-lkp@intel.com/config)
> compiler: s390-linux-gcc (GCC) 13.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230929/202309292102.R2ui2IV9-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/202309292102.R2ui2IV9-lkp@intel.com/
> 
> All error/warnings (new ones prefixed by >>):
> 

This is fixed by this commit:

https://lore.kernel.org/lkml/20230920160401.854052-1-ckeepax@opensource.cirrus.com/

Thanks,
Charles

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-10-02  8:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-15  0:26 drivers/soundwire/bus_type.c:126:30: error: implicit declaration of function 'irq_create_mapping'; did you mean 'irq_dispose_mapping'? kernel test robot
2023-09-16  5:14 ` Randy Dunlap
2023-09-18 12:01   ` Charles Keepax
  -- strict thread matches above, loose matches on Subject: below --
2023-09-29 13:08 kernel test robot
2023-10-02  8:55 ` Charles Keepax

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox