linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/4] sdio: Use bus type function for shutdown
@ 2025-12-17 11:09 Uwe Kleine-König
  2025-12-17 11:09 ` [PATCH v1 2/4] wifi: rsi: sdio: Reduce use of #ifdef for CONFIG_PM Uwe Kleine-König
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2025-12-17 11:09 UTC (permalink / raw)
  To: Karun Eagalapati, Amitkumar Karwar, Kalle Valo, Ulf Hansson,
	Ping-Ke Shih
  Cc: linux-mmc, linux-kernel, linux-wireless

Hello,

this series is part of an effort to get rid of the .shutdown() callback
(and .probe() and .remove()) in struct device_driver. Preparing that,
all sdio drivers that up to now use this callback are converted to a new
sdio specific shutdown callback.

Patch #2 is just a cleanup I noticed while working on
drivers/net/wireless/rsi/rsi_91x_sdio.c. Note that it's uncommon to have
the shutdown callback conditionalized by #ifdef CONFIG_PM. I guess this
dependency was introduced by mistake in commit 063848c3e155 ("rsi: sdio:
Add WOWLAN support for S5 shutdown state"), but I didn't address it
here.

Patches #3 and #4 depend on the first patch, and with just the first
patch applied there is a runtime warning (emitted by the driver core in
driver_register()) for each unconverted driver. So it would be nice to
get the whole series in during a single merge window to not let users
face the warning.

This series was build tested on amd64 and arm64 using allmodconfig.

Best regards
Uwe

Uwe Kleine-König (4):
  sdio: Provide a bustype shutdown function
  wifi: rsi: sdio: Reduce use of #ifdef for CONFIG_PM
  wifi: rsi: sdio: Migrate to use sdio specific shutdown function
  wifi: rtw88: sdio: Migrate to use sdio specific shutdown function

 drivers/mmc/core/sdio_bus.c                   | 25 +++++++++++++++++++
 .../net/wireless/realtek/rtw88/rtw8723cs.c    |  2 +-
 .../net/wireless/realtek/rtw88/rtw8723ds.c    |  2 +-
 .../net/wireless/realtek/rtw88/rtw8821cs.c    |  2 +-
 .../net/wireless/realtek/rtw88/rtw8822bs.c    |  2 +-
 .../net/wireless/realtek/rtw88/rtw8822cs.c    |  2 +-
 drivers/net/wireless/realtek/rtw88/sdio.c     |  3 +--
 drivers/net/wireless/realtek/rtw88/sdio.h     |  2 +-
 drivers/net/wireless/rsi/rsi_91x_sdio.c       | 11 +++-----
 include/linux/mmc/sdio_func.h                 |  1 +
 10 files changed, 36 insertions(+), 16 deletions(-)

base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
-- 
2.47.3


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

* [PATCH v1 2/4] wifi: rsi: sdio: Reduce use of #ifdef for CONFIG_PM
  2025-12-17 11:09 [PATCH v1 0/4] sdio: Use bus type function for shutdown Uwe Kleine-König
@ 2025-12-17 11:09 ` Uwe Kleine-König
  2025-12-20 16:20   ` kernel test robot
                     ` (2 more replies)
  2025-12-17 11:09 ` [PATCH v1 3/4] wifi: rsi: sdio: Migrate to use sdio specific shutdown function Uwe Kleine-König
  2025-12-17 11:09 ` [PATCH v1 4/4] wifi: rtw88: " Uwe Kleine-König
  2 siblings, 3 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2025-12-17 11:09 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: linux-mmc, linux-wireless, linux-kernel

This drops two #ifdefs (which is good because they are ugly) without
changing semantics. This also improves compile coverage because all the
code in the first #ifdef block is now compiled even for configurations
without CONFIG_PM (and then thrown away).

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
 drivers/net/wireless/rsi/rsi_91x_sdio.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c
index 1e578533e473..c2b2d09b616f 100644
--- a/drivers/net/wireless/rsi/rsi_91x_sdio.c
+++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c
@@ -1243,7 +1243,6 @@ static void rsi_disconnect(struct sdio_func *pfunction)
 
 }
 
-#ifdef CONFIG_PM
 static int rsi_set_sdio_pm_caps(struct rsi_hw *adapter)
 {
 	struct rsi_91x_sdiodev *dev = adapter->rsi_dev;
@@ -1499,7 +1498,6 @@ static const struct dev_pm_ops rsi_pm_ops = {
 	.thaw = rsi_thaw,
 	.restore = rsi_restore,
 };
-#endif
 
 static const struct sdio_device_id rsi_dev_table[] =  {
 	{ SDIO_DEVICE(SDIO_VENDOR_ID_RSI, SDIO_DEVICE_ID_RSI_9113) },
@@ -1512,12 +1510,10 @@ static struct sdio_driver rsi_driver = {
 	.probe      = rsi_probe,
 	.remove     = rsi_disconnect,
 	.id_table   = rsi_dev_table,
-#ifdef CONFIG_PM
 	.drv = {
-		.pm = &rsi_pm_ops,
-		.shutdown   = rsi_shutdown,
+		.pm = pm_ptr(&rsi_pm_ops),
+		.shutdown = pm_ptr(rsi_shutdown),
 	}
-#endif
 };
 module_sdio_driver(rsi_driver);
 
-- 
2.47.3


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

* [PATCH v1 3/4] wifi: rsi: sdio: Migrate to use sdio specific shutdown function
  2025-12-17 11:09 [PATCH v1 0/4] sdio: Use bus type function for shutdown Uwe Kleine-König
  2025-12-17 11:09 ` [PATCH v1 2/4] wifi: rsi: sdio: Reduce use of #ifdef for CONFIG_PM Uwe Kleine-König
@ 2025-12-17 11:09 ` Uwe Kleine-König
  2025-12-19 12:24   ` Ulf Hansson
  2025-12-17 11:09 ` [PATCH v1 4/4] wifi: rtw88: " Uwe Kleine-König
  2 siblings, 1 reply; 9+ messages in thread
From: Uwe Kleine-König @ 2025-12-17 11:09 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: linux-mmc, linux-wireless, linux-kernel

This saves a cast in the driver. The motivation is stop using the callback
.shutdown in rsi_driver.drv to make it possible to drop that.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
 drivers/net/wireless/rsi/rsi_91x_sdio.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c
index c2b2d09b616f..a1376847ac85 100644
--- a/drivers/net/wireless/rsi/rsi_91x_sdio.c
+++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c
@@ -1442,9 +1442,8 @@ static int rsi_thaw(struct device *dev)
 	return 0;
 }
 
-static void rsi_shutdown(struct device *dev)
+static void rsi_shutdown(struct sdio_func *pfunction)
 {
-	struct sdio_func *pfunction = dev_to_sdio_func(dev);
 	struct rsi_hw *adapter = sdio_get_drvdata(pfunction);
 	struct rsi_91x_sdiodev *sdev = adapter->rsi_dev;
 	struct ieee80211_hw *hw = adapter->hw;
@@ -1509,10 +1508,10 @@ static struct sdio_driver rsi_driver = {
 	.name       = "RSI-SDIO WLAN",
 	.probe      = rsi_probe,
 	.remove     = rsi_disconnect,
+	.shutdown   = pm_ptr(rsi_shutdown),
 	.id_table   = rsi_dev_table,
 	.drv = {
 		.pm = pm_ptr(&rsi_pm_ops),
-		.shutdown = pm_ptr(rsi_shutdown),
 	}
 };
 module_sdio_driver(rsi_driver);
-- 
2.47.3


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

* [PATCH v1 4/4] wifi: rtw88: sdio: Migrate to use sdio specific shutdown function
  2025-12-17 11:09 [PATCH v1 0/4] sdio: Use bus type function for shutdown Uwe Kleine-König
  2025-12-17 11:09 ` [PATCH v1 2/4] wifi: rsi: sdio: Reduce use of #ifdef for CONFIG_PM Uwe Kleine-König
  2025-12-17 11:09 ` [PATCH v1 3/4] wifi: rsi: sdio: Migrate to use sdio specific shutdown function Uwe Kleine-König
@ 2025-12-17 11:09 ` Uwe Kleine-König
  2 siblings, 0 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2025-12-17 11:09 UTC (permalink / raw)
  To: Ulf Hansson, Ping-Ke Shih; +Cc: linux-mmc, linux-wireless, linux-kernel

This saves a cast in the driver. The motivation is stop using the callback
.shutdown in rsi_driver.drv to make it possible to drop that.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
 drivers/net/wireless/realtek/rtw88/rtw8723cs.c | 2 +-
 drivers/net/wireless/realtek/rtw88/rtw8723ds.c | 2 +-
 drivers/net/wireless/realtek/rtw88/rtw8821cs.c | 2 +-
 drivers/net/wireless/realtek/rtw88/rtw8822bs.c | 2 +-
 drivers/net/wireless/realtek/rtw88/rtw8822cs.c | 2 +-
 drivers/net/wireless/realtek/rtw88/sdio.c      | 3 +--
 drivers/net/wireless/realtek/rtw88/sdio.h      | 2 +-
 7 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw88/rtw8723cs.c b/drivers/net/wireless/realtek/rtw88/rtw8723cs.c
index 1f98d35a8dd1..2018c9d76dd1 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8723cs.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723cs.c
@@ -23,9 +23,9 @@ static struct sdio_driver rtw_8723cs_driver = {
 	.id_table = rtw_8723cs_id_table,
 	.probe = rtw_sdio_probe,
 	.remove = rtw_sdio_remove,
+	.shutdown = rtw_sdio_shutdown,
 	.drv = {
 		.pm = &rtw_sdio_pm_ops,
-		.shutdown = rtw_sdio_shutdown
 	}};
 module_sdio_driver(rtw_8723cs_driver);
 
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8723ds.c b/drivers/net/wireless/realtek/rtw88/rtw8723ds.c
index 206b77e5b98e..e38c90b769a2 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8723ds.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723ds.c
@@ -28,10 +28,10 @@ static struct sdio_driver rtw_8723ds_driver = {
 	.name = KBUILD_MODNAME,
 	.probe = rtw_sdio_probe,
 	.remove = rtw_sdio_remove,
+	.shutdown = rtw_sdio_shutdown,
 	.id_table = rtw_8723ds_id_table,
 	.drv = {
 		.pm = &rtw_sdio_pm_ops,
-		.shutdown = rtw_sdio_shutdown,
 	}
 };
 module_sdio_driver(rtw_8723ds_driver);
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8821cs.c b/drivers/net/wireless/realtek/rtw88/rtw8821cs.c
index 6d94162213c6..58e0ef219cdc 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8821cs.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821cs.c
@@ -23,10 +23,10 @@ static struct sdio_driver rtw_8821cs_driver = {
 	.name = KBUILD_MODNAME,
 	.probe = rtw_sdio_probe,
 	.remove = rtw_sdio_remove,
+	.shutdown = rtw_sdio_shutdown,
 	.id_table = rtw_8821cs_id_table,
 	.drv = {
 		.pm = &rtw_sdio_pm_ops,
-		.shutdown = rtw_sdio_shutdown,
 	}
 };
 module_sdio_driver(rtw_8821cs_driver);
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822bs.c b/drivers/net/wireless/realtek/rtw88/rtw8822bs.c
index 744781dcb419..2de9b11540c5 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822bs.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822bs.c
@@ -23,10 +23,10 @@ static struct sdio_driver rtw_8822bs_driver = {
 	.name = KBUILD_MODNAME,
 	.probe = rtw_sdio_probe,
 	.remove = rtw_sdio_remove,
+	.shutdown = rtw_sdio_shutdown,
 	.id_table = rtw_8822bs_id_table,
 	.drv = {
 		.pm = &rtw_sdio_pm_ops,
-		.shutdown = rtw_sdio_shutdown,
 	}
 };
 module_sdio_driver(rtw_8822bs_driver);
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822cs.c b/drivers/net/wireless/realtek/rtw88/rtw8822cs.c
index 322281e07eb8..b00ef4173962 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822cs.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822cs.c
@@ -23,10 +23,10 @@ static struct sdio_driver rtw_8822cs_driver = {
 	.name = KBUILD_MODNAME,
 	.probe = rtw_sdio_probe,
 	.remove = rtw_sdio_remove,
+	.shutdown = rtw_sdio_shutdown,
 	.id_table = rtw_8822cs_id_table,
 	.drv = {
 		.pm = &rtw_sdio_pm_ops,
-		.shutdown = rtw_sdio_shutdown,
 	}
 };
 module_sdio_driver(rtw_8822cs_driver);
diff --git a/drivers/net/wireless/realtek/rtw88/sdio.c b/drivers/net/wireless/realtek/rtw88/sdio.c
index 99d7c629eac6..ebd7636e2408 100644
--- a/drivers/net/wireless/realtek/rtw88/sdio.c
+++ b/drivers/net/wireless/realtek/rtw88/sdio.c
@@ -1412,9 +1412,8 @@ void rtw_sdio_remove(struct sdio_func *sdio_func)
 }
 EXPORT_SYMBOL(rtw_sdio_remove);
 
-void rtw_sdio_shutdown(struct device *dev)
+void rtw_sdio_shutdown(struct sdio_func *sdio_func)
 {
-	struct sdio_func *sdio_func = dev_to_sdio_func(dev);
 	const struct rtw_chip_info *chip;
 	struct ieee80211_hw *hw;
 	struct rtw_dev *rtwdev;
diff --git a/drivers/net/wireless/realtek/rtw88/sdio.h b/drivers/net/wireless/realtek/rtw88/sdio.h
index 3c659ed180f0..457e8b02380e 100644
--- a/drivers/net/wireless/realtek/rtw88/sdio.h
+++ b/drivers/net/wireless/realtek/rtw88/sdio.h
@@ -166,7 +166,7 @@ extern const struct dev_pm_ops rtw_sdio_pm_ops;
 int rtw_sdio_probe(struct sdio_func *sdio_func,
 		   const struct sdio_device_id *id);
 void rtw_sdio_remove(struct sdio_func *sdio_func);
-void rtw_sdio_shutdown(struct device *dev);
+void rtw_sdio_shutdown(struct sdio_func *sdio_func);
 
 static inline bool rtw_sdio_is_sdio30_supported(struct rtw_dev *rtwdev)
 {
-- 
2.47.3


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

* Re: [PATCH v1 3/4] wifi: rsi: sdio: Migrate to use sdio specific shutdown function
  2025-12-17 11:09 ` [PATCH v1 3/4] wifi: rsi: sdio: Migrate to use sdio specific shutdown function Uwe Kleine-König
@ 2025-12-19 12:24   ` Ulf Hansson
  0 siblings, 0 replies; 9+ messages in thread
From: Ulf Hansson @ 2025-12-19 12:24 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: linux-mmc, linux-wireless, linux-kernel

On Wed, 17 Dec 2025 at 12:09, Uwe Kleine-König
<u.kleine-koenig@baylibre.com> wrote:
>
> This saves a cast in the driver. The motivation is stop using the callback
> .shutdown in rsi_driver.drv to make it possible to drop that.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> ---
>  drivers/net/wireless/rsi/rsi_91x_sdio.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c
> index c2b2d09b616f..a1376847ac85 100644
> --- a/drivers/net/wireless/rsi/rsi_91x_sdio.c
> +++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c
> @@ -1442,9 +1442,8 @@ static int rsi_thaw(struct device *dev)
>         return 0;
>  }
>
> -static void rsi_shutdown(struct device *dev)
> +static void rsi_shutdown(struct sdio_func *pfunction)
>  {
> -       struct sdio_func *pfunction = dev_to_sdio_func(dev);
>         struct rsi_hw *adapter = sdio_get_drvdata(pfunction);
>         struct rsi_91x_sdiodev *sdev = adapter->rsi_dev;
>         struct ieee80211_hw *hw = adapter->hw;
> @@ -1509,10 +1508,10 @@ static struct sdio_driver rsi_driver = {
>         .name       = "RSI-SDIO WLAN",
>         .probe      = rsi_probe,
>         .remove     = rsi_disconnect,
> +       .shutdown   = pm_ptr(rsi_shutdown),
>         .id_table   = rsi_dev_table,
>         .drv = {
>                 .pm = pm_ptr(&rsi_pm_ops),
> -               .shutdown = pm_ptr(rsi_shutdown),

Apologize for my ignorance, but why does an SDIO function driver need
a ->shutdown() callback in the first place?

What does it need to do during shutdown?

>         }
>  };
>  module_sdio_driver(rsi_driver);
> --
> 2.47.3
>

Kind regards
Uffe

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

* Re: [PATCH v1 2/4] wifi: rsi: sdio: Reduce use of #ifdef for CONFIG_PM
  2025-12-17 11:09 ` [PATCH v1 2/4] wifi: rsi: sdio: Reduce use of #ifdef for CONFIG_PM Uwe Kleine-König
@ 2025-12-20 16:20   ` kernel test robot
  2025-12-20 17:59   ` kernel test robot
  2025-12-29 10:36   ` Johannes Berg
  2 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2025-12-20 16:20 UTC (permalink / raw)
  To: Uwe Kleine-König, Ulf Hansson
  Cc: oe-kbuild-all, linux-mmc, linux-wireless, linux-kernel

Hi Uwe,

kernel test robot noticed the following build errors:

[auto build test ERROR on 8f0b4cce4481fb22653697cced8d0d04027cb1e8]

url:    https://github.com/intel-lab-lkp/linux/commits/Uwe-Kleine-K-nig/sdio-Provide-a-bustype-shutdown-function/20251217-191920
base:   8f0b4cce4481fb22653697cced8d0d04027cb1e8
patch link:    https://lore.kernel.org/r/f291cca2741f6ac994b2bde1fb9d21194fec4d3e.1765968841.git.ukleinek%40kernel.org
patch subject: [PATCH v1 2/4] wifi: rsi: sdio: Reduce use of #ifdef for CONFIG_PM
config: nios2-allmodconfig (https://download.01.org/0day-ci/archive/20251221/202512210032.6Skz9prt-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251221/202512210032.6Skz9prt-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/202512210032.6Skz9prt-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/net/wireless/rsi/rsi_91x_sdio.c: In function 'rsi_shutdown':
>> drivers/net/wireless/rsi/rsi_91x_sdio.c:1454:41: error: 'struct wiphy' has no member named 'wowlan_config'
    1454 |         if (hw && hw->wiphy && hw->wiphy->wowlan_config) {
         |                                         ^~
>> drivers/net/wireless/rsi/rsi_91x_sdio.c:1455:21: error: implicit declaration of function 'rsi_config_wowlan' [-Werror=implicit-function-declaration]
    1455 |                 if (rsi_config_wowlan(adapter, hw->wiphy->wowlan_config))
         |                     ^~~~~~~~~~~~~~~~~
   drivers/net/wireless/rsi/rsi_91x_sdio.c:1455:57: error: 'struct wiphy' has no member named 'wowlan_config'
    1455 |                 if (rsi_config_wowlan(adapter, hw->wiphy->wowlan_config))
         |                                                         ^~
   cc1: some warnings being treated as errors


vim +1454 drivers/net/wireless/rsi/rsi_91x_sdio.c

b6c8d06c8a6465 Karun Eagalapati  2017-10-27  1444  
063848c3e1558e Karun Eagalapati  2017-10-27  1445  static void rsi_shutdown(struct device *dev)
063848c3e1558e Karun Eagalapati  2017-10-27  1446  {
063848c3e1558e Karun Eagalapati  2017-10-27  1447  	struct sdio_func *pfunction = dev_to_sdio_func(dev);
063848c3e1558e Karun Eagalapati  2017-10-27  1448  	struct rsi_hw *adapter = sdio_get_drvdata(pfunction);
f9bf6e729f4ebc Wu Yunchuan       2023-08-03  1449  	struct rsi_91x_sdiodev *sdev = adapter->rsi_dev;
063848c3e1558e Karun Eagalapati  2017-10-27  1450  	struct ieee80211_hw *hw = adapter->hw;
063848c3e1558e Karun Eagalapati  2017-10-27  1451  
063848c3e1558e Karun Eagalapati  2017-10-27  1452  	rsi_dbg(ERR_ZONE, "SDIO Bus shutdown =====>\n");
063848c3e1558e Karun Eagalapati  2017-10-27  1453  
b241e260820b68 Marek Vasut       2023-05-28 @1454  	if (hw && hw->wiphy && hw->wiphy->wowlan_config) {
b241e260820b68 Marek Vasut       2023-05-28 @1455  		if (rsi_config_wowlan(adapter, hw->wiphy->wowlan_config))
063848c3e1558e Karun Eagalapati  2017-10-27  1456  			rsi_dbg(ERR_ZONE, "Failed to configure WoWLAN\n");
16bbc3eb83728c Martin Kepplinger 2020-01-29  1457  	}
063848c3e1558e Karun Eagalapati  2017-10-27  1458  
cbde979b33fa16 Siva Rebbagondla  2019-02-04  1459  	if (IS_ENABLED(CONFIG_RSI_COEX) && adapter->priv->coex_mode > 1 &&
cbde979b33fa16 Siva Rebbagondla  2019-02-04  1460  	    adapter->priv->bt_adapter) {
cbde979b33fa16 Siva Rebbagondla  2019-02-04  1461  		rsi_bt_ops.detach(adapter->priv->bt_adapter);
cbde979b33fa16 Siva Rebbagondla  2019-02-04  1462  		adapter->priv->bt_adapter = NULL;
cbde979b33fa16 Siva Rebbagondla  2019-02-04  1463  	}
cbde979b33fa16 Siva Rebbagondla  2019-02-04  1464  
063848c3e1558e Karun Eagalapati  2017-10-27  1465  	rsi_sdio_disable_interrupts(sdev->pfunction);
063848c3e1558e Karun Eagalapati  2017-10-27  1466  
063848c3e1558e Karun Eagalapati  2017-10-27  1467  	if (sdev->write_fail)
063848c3e1558e Karun Eagalapati  2017-10-27  1468  		rsi_dbg(INFO_ZONE, "###### Device is not ready #######\n");
063848c3e1558e Karun Eagalapati  2017-10-27  1469  
063848c3e1558e Karun Eagalapati  2017-10-27  1470  	rsi_dbg(INFO_ZONE, "***** RSI module shut down *****\n");
063848c3e1558e Karun Eagalapati  2017-10-27  1471  }
063848c3e1558e Karun Eagalapati  2017-10-27  1472  

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

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

* Re: [PATCH v1 2/4] wifi: rsi: sdio: Reduce use of #ifdef for CONFIG_PM
  2025-12-17 11:09 ` [PATCH v1 2/4] wifi: rsi: sdio: Reduce use of #ifdef for CONFIG_PM Uwe Kleine-König
  2025-12-20 16:20   ` kernel test robot
@ 2025-12-20 17:59   ` kernel test robot
  2025-12-29 10:36   ` Johannes Berg
  2 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2025-12-20 17:59 UTC (permalink / raw)
  To: Uwe Kleine-König, Ulf Hansson
  Cc: llvm, oe-kbuild-all, linux-mmc, linux-wireless, linux-kernel

Hi Uwe,

kernel test robot noticed the following build errors:

[auto build test ERROR on 8f0b4cce4481fb22653697cced8d0d04027cb1e8]

url:    https://github.com/intel-lab-lkp/linux/commits/Uwe-Kleine-K-nig/sdio-Provide-a-bustype-shutdown-function/20251217-191920
base:   8f0b4cce4481fb22653697cced8d0d04027cb1e8
patch link:    https://lore.kernel.org/r/f291cca2741f6ac994b2bde1fb9d21194fec4d3e.1765968841.git.ukleinek%40kernel.org
patch subject: [PATCH v1 2/4] wifi: rsi: sdio: Reduce use of #ifdef for CONFIG_PM
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20251221/202512210133.jrzKgXWS-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251221/202512210133.jrzKgXWS-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/202512210133.jrzKgXWS-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/net/wireless/rsi/rsi_91x_sdio.c:1454:36: error: no member named 'wowlan_config' in 'struct wiphy'
    1454 |         if (hw && hw->wiphy && hw->wiphy->wowlan_config) {
         |                                ~~~~~~~~~  ^
>> drivers/net/wireless/rsi/rsi_91x_sdio.c:1455:7: error: call to undeclared function 'rsi_config_wowlan'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1455 |                 if (rsi_config_wowlan(adapter, hw->wiphy->wowlan_config))
         |                     ^
   drivers/net/wireless/rsi/rsi_91x_sdio.c:1455:45: error: no member named 'wowlan_config' in 'struct wiphy'
    1455 |                 if (rsi_config_wowlan(adapter, hw->wiphy->wowlan_config))
         |                                                ~~~~~~~~~  ^
   3 errors generated.


vim +1454 drivers/net/wireless/rsi/rsi_91x_sdio.c

b6c8d06c8a6465 Karun Eagalapati  2017-10-27  1444  
063848c3e1558e Karun Eagalapati  2017-10-27  1445  static void rsi_shutdown(struct device *dev)
063848c3e1558e Karun Eagalapati  2017-10-27  1446  {
063848c3e1558e Karun Eagalapati  2017-10-27  1447  	struct sdio_func *pfunction = dev_to_sdio_func(dev);
063848c3e1558e Karun Eagalapati  2017-10-27  1448  	struct rsi_hw *adapter = sdio_get_drvdata(pfunction);
f9bf6e729f4ebc Wu Yunchuan       2023-08-03  1449  	struct rsi_91x_sdiodev *sdev = adapter->rsi_dev;
063848c3e1558e Karun Eagalapati  2017-10-27  1450  	struct ieee80211_hw *hw = adapter->hw;
063848c3e1558e Karun Eagalapati  2017-10-27  1451  
063848c3e1558e Karun Eagalapati  2017-10-27  1452  	rsi_dbg(ERR_ZONE, "SDIO Bus shutdown =====>\n");
063848c3e1558e Karun Eagalapati  2017-10-27  1453  
b241e260820b68 Marek Vasut       2023-05-28 @1454  	if (hw && hw->wiphy && hw->wiphy->wowlan_config) {
b241e260820b68 Marek Vasut       2023-05-28 @1455  		if (rsi_config_wowlan(adapter, hw->wiphy->wowlan_config))
063848c3e1558e Karun Eagalapati  2017-10-27  1456  			rsi_dbg(ERR_ZONE, "Failed to configure WoWLAN\n");
16bbc3eb83728c Martin Kepplinger 2020-01-29  1457  	}
063848c3e1558e Karun Eagalapati  2017-10-27  1458  
cbde979b33fa16 Siva Rebbagondla  2019-02-04  1459  	if (IS_ENABLED(CONFIG_RSI_COEX) && adapter->priv->coex_mode > 1 &&
cbde979b33fa16 Siva Rebbagondla  2019-02-04  1460  	    adapter->priv->bt_adapter) {
cbde979b33fa16 Siva Rebbagondla  2019-02-04  1461  		rsi_bt_ops.detach(adapter->priv->bt_adapter);
cbde979b33fa16 Siva Rebbagondla  2019-02-04  1462  		adapter->priv->bt_adapter = NULL;
cbde979b33fa16 Siva Rebbagondla  2019-02-04  1463  	}
cbde979b33fa16 Siva Rebbagondla  2019-02-04  1464  
063848c3e1558e Karun Eagalapati  2017-10-27  1465  	rsi_sdio_disable_interrupts(sdev->pfunction);
063848c3e1558e Karun Eagalapati  2017-10-27  1466  
063848c3e1558e Karun Eagalapati  2017-10-27  1467  	if (sdev->write_fail)
063848c3e1558e Karun Eagalapati  2017-10-27  1468  		rsi_dbg(INFO_ZONE, "###### Device is not ready #######\n");
063848c3e1558e Karun Eagalapati  2017-10-27  1469  
063848c3e1558e Karun Eagalapati  2017-10-27  1470  	rsi_dbg(INFO_ZONE, "***** RSI module shut down *****\n");
063848c3e1558e Karun Eagalapati  2017-10-27  1471  }
063848c3e1558e Karun Eagalapati  2017-10-27  1472  

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

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

* Re: [PATCH v1 2/4] wifi: rsi: sdio: Reduce use of #ifdef for CONFIG_PM
  2025-12-17 11:09 ` [PATCH v1 2/4] wifi: rsi: sdio: Reduce use of #ifdef for CONFIG_PM Uwe Kleine-König
  2025-12-20 16:20   ` kernel test robot
  2025-12-20 17:59   ` kernel test robot
@ 2025-12-29 10:36   ` Johannes Berg
  2025-12-30 18:56     ` Uwe Kleine-König
  2 siblings, 1 reply; 9+ messages in thread
From: Johannes Berg @ 2025-12-29 10:36 UTC (permalink / raw)
  To: Uwe Kleine-König, Ulf Hansson
  Cc: linux-mmc, linux-wireless, linux-kernel

On Wed, 2025-12-17 at 12:09 +0100, Uwe Kleine-König wrote:
> This drops two #ifdefs (which is good because they are ugly) without
> changing semantics. This also improves compile coverage because all the
> code in the first #ifdef block is now compiled even for configurations
> without CONFIG_PM (and then thrown away).

This didn't build, and given that we never got 1/4 I'm going to assume
it wasn't destined to the wireless tree.

johannes

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

* Re: [PATCH v1 2/4] wifi: rsi: sdio: Reduce use of #ifdef for CONFIG_PM
  2025-12-29 10:36   ` Johannes Berg
@ 2025-12-30 18:56     ` Uwe Kleine-König
  0 siblings, 0 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2025-12-30 18:56 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Ulf Hansson, linux-mmc, linux-wireless, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 931 bytes --]

On Mon, Dec 29, 2025 at 11:36:02AM +0100, Johannes Berg wrote:
> On Wed, 2025-12-17 at 12:09 +0100, Uwe Kleine-König wrote:
> > This drops two #ifdefs (which is good because they are ugly) without
> > changing semantics. This also improves compile coverage because all the
> > code in the first #ifdef block is now compiled even for configurations
> > without CONFIG_PM (and then thrown away).
> 
> This didn't build, and given that we never got 1/4 I'm going to assume
> it wasn't destined to the wireless tree.

Yes, this depends on patch #1, I expected the series to go in via
whatever tree sdio usually goes in and didn't notice that all users are
in the wireless subsystem.

The kernel robot also found an issue[1] that needs addressing (probably
by dropping patch #2 from the series). Will look into that next year.

Best regards
Uwe

[1] https://lore.kernel.org/all/202512210032.6Skz9prt-lkp@intel.com/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2025-12-30 18:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-17 11:09 [PATCH v1 0/4] sdio: Use bus type function for shutdown Uwe Kleine-König
2025-12-17 11:09 ` [PATCH v1 2/4] wifi: rsi: sdio: Reduce use of #ifdef for CONFIG_PM Uwe Kleine-König
2025-12-20 16:20   ` kernel test robot
2025-12-20 17:59   ` kernel test robot
2025-12-29 10:36   ` Johannes Berg
2025-12-30 18:56     ` Uwe Kleine-König
2025-12-17 11:09 ` [PATCH v1 3/4] wifi: rsi: sdio: Migrate to use sdio specific shutdown function Uwe Kleine-König
2025-12-19 12:24   ` Ulf Hansson
2025-12-17 11:09 ` [PATCH v1 4/4] wifi: rtw88: " Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).