From: Uwe Kleine-König Date: Mon, 15 Dec 2025 17:49:25 +0000 (+0100) Subject: soundwire: Make remove function return no value X-Git-Tag: v7.0-rc1~61^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=478f3890709a092a97a0218f61af19ac9b725573;p=thirdparty%2Fkernel%2Flinux.git soundwire: Make remove function return no value All remove functions return zero and the driver core ignores any other returned value (just emits a warning about it being ignored). So make all remove callbacks return void instead of an ignored int. This is in line with most other subsystems. Signed-off-by: Uwe Kleine-König Link: https://patch.msgid.link/20251215174925.1327021-5-u.kleine-koenig@baylibre.com Signed-off-by: Vinod Koul --- diff --git a/drivers/soundwire/bus_type.c b/drivers/soundwire/bus_type.c index 91e70cb46fb57..c40de98f14856 100644 --- a/drivers/soundwire/bus_type.c +++ b/drivers/soundwire/bus_type.c @@ -168,7 +168,6 @@ static int sdw_drv_remove(struct device *dev) { struct sdw_slave *slave = dev_to_sdw_dev(dev); struct sdw_driver *drv = drv_to_sdw_driver(dev->driver); - int ret = 0; mutex_lock(&slave->sdw_dev_lock); @@ -177,11 +176,11 @@ static int sdw_drv_remove(struct device *dev) mutex_unlock(&slave->sdw_dev_lock); if (drv->remove) - ret = drv->remove(slave); + drv->remove(slave); ida_free(&slave->bus->slave_ida, slave->index); - return ret; + return 0; } static void sdw_drv_shutdown(struct device *dev) diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index e6a3476bcef1a..f462717acf206 100644 --- a/include/linux/soundwire/sdw.h +++ b/include/linux/soundwire/sdw.h @@ -705,7 +705,7 @@ struct sdw_master_device { struct sdw_driver { int (*probe)(struct sdw_slave *sdw, const struct sdw_device_id *id); - int (*remove)(struct sdw_slave *sdw); + void (*remove)(struct sdw_slave *sdw); void (*shutdown)(struct sdw_slave *sdw); const struct sdw_device_id *id_table; diff --git a/sound/soc/codecs/cs35l56-sdw.c b/sound/soc/codecs/cs35l56-sdw.c index 42d24ac2977fc..30b3192d6ce9b 100644 --- a/sound/soc/codecs/cs35l56-sdw.c +++ b/sound/soc/codecs/cs35l56-sdw.c @@ -554,7 +554,7 @@ static int cs35l56_sdw_probe(struct sdw_slave *peripheral, const struct sdw_devi return 0; } -static int cs35l56_sdw_remove(struct sdw_slave *peripheral) +static void cs35l56_sdw_remove(struct sdw_slave *peripheral) { struct cs35l56_private *cs35l56 = dev_get_drvdata(&peripheral->dev); @@ -566,8 +566,6 @@ static int cs35l56_sdw_remove(struct sdw_slave *peripheral) sdw_write_no_pm(peripheral, CS35L56_SDW_GEN_INT_STAT_1, 0xFF); cs35l56_remove(cs35l56); - - return 0; } static const struct dev_pm_ops cs35l56_sdw_pm = { diff --git a/sound/soc/codecs/cs42l42-sdw.c b/sound/soc/codecs/cs42l42-sdw.c index f837c7eff10b3..d5999ad9ff9b4 100644 --- a/sound/soc/codecs/cs42l42-sdw.c +++ b/sound/soc/codecs/cs42l42-sdw.c @@ -585,14 +585,12 @@ static int cs42l42_sdw_probe(struct sdw_slave *peripheral, const struct sdw_devi return 0; } -static int cs42l42_sdw_remove(struct sdw_slave *peripheral) +static void cs42l42_sdw_remove(struct sdw_slave *peripheral) { struct cs42l42_private *cs42l42 = dev_get_drvdata(&peripheral->dev); cs42l42_common_remove(cs42l42); pm_runtime_disable(cs42l42->dev); - - return 0; } static const struct dev_pm_ops cs42l42_sdw_pm = { diff --git a/sound/soc/codecs/max98373-sdw.c b/sound/soc/codecs/max98373-sdw.c index 88ff215f52b34..16673440218cb 100644 --- a/sound/soc/codecs/max98373-sdw.c +++ b/sound/soc/codecs/max98373-sdw.c @@ -839,11 +839,9 @@ static int max98373_sdw_probe(struct sdw_slave *slave, return max98373_init(slave, regmap); } -static int max98373_sdw_remove(struct sdw_slave *slave) +static void max98373_sdw_remove(struct sdw_slave *slave) { pm_runtime_disable(&slave->dev); - - return 0; } #if defined(CONFIG_OF) diff --git a/sound/soc/codecs/pm4125-sdw.c b/sound/soc/codecs/pm4125-sdw.c index 3167b38e2876e..1c612ae4a4b27 100644 --- a/sound/soc/codecs/pm4125-sdw.c +++ b/sound/soc/codecs/pm4125-sdw.c @@ -436,13 +436,11 @@ static int pm4125_probe(struct sdw_slave *pdev, const struct sdw_device_id *id) return 0; } -static int pm4125_remove(struct sdw_slave *pdev) +static void pm4125_remove(struct sdw_slave *pdev) { struct device *dev = &pdev->dev; component_del(dev, &wcd_sdw_component_ops); - - return 0; } static const struct sdw_device_id pm4125_slave_id[] = { diff --git a/sound/soc/codecs/rt1017-sdca-sdw.c b/sound/soc/codecs/rt1017-sdca-sdw.c index a9c000876be8b..148b36173a257 100644 --- a/sound/soc/codecs/rt1017-sdca-sdw.c +++ b/sound/soc/codecs/rt1017-sdca-sdw.c @@ -741,14 +741,12 @@ static int rt1017_sdca_sdw_probe(struct sdw_slave *slave, return rt1017_sdca_init(&slave->dev, regmap, slave); } -static int rt1017_sdca_sdw_remove(struct sdw_slave *slave) +static void rt1017_sdca_sdw_remove(struct sdw_slave *slave) { struct rt1017_sdca_priv *rt1017 = dev_get_drvdata(&slave->dev); if (rt1017->first_hw_init) pm_runtime_disable(&slave->dev); - - return 0; } static const struct sdw_device_id rt1017_sdca_id[] = { diff --git a/sound/soc/codecs/rt1308-sdw.c b/sound/soc/codecs/rt1308-sdw.c index b6c224832a431..e077d096bc239 100644 --- a/sound/soc/codecs/rt1308-sdw.c +++ b/sound/soc/codecs/rt1308-sdw.c @@ -739,11 +739,9 @@ static int rt1308_sdw_probe(struct sdw_slave *slave, return rt1308_sdw_init(&slave->dev, regmap, slave); } -static int rt1308_sdw_remove(struct sdw_slave *slave) +static void rt1308_sdw_remove(struct sdw_slave *slave) { pm_runtime_disable(&slave->dev); - - return 0; } static const struct sdw_device_id rt1308_id[] = { diff --git a/sound/soc/codecs/rt1316-sdw.c b/sound/soc/codecs/rt1316-sdw.c index 01a9773988646..20fc1579eb9cf 100644 --- a/sound/soc/codecs/rt1316-sdw.c +++ b/sound/soc/codecs/rt1316-sdw.c @@ -716,11 +716,9 @@ static int rt1316_sdw_probe(struct sdw_slave *slave, return rt1316_sdw_init(&slave->dev, regmap, slave); } -static int rt1316_sdw_remove(struct sdw_slave *slave) +static void rt1316_sdw_remove(struct sdw_slave *slave) { pm_runtime_disable(&slave->dev); - - return 0; } static const struct sdw_device_id rt1316_id[] = { diff --git a/sound/soc/codecs/rt1318-sdw.c b/sound/soc/codecs/rt1318-sdw.c index 70db5450d6d29..d28f1afe68f18 100644 --- a/sound/soc/codecs/rt1318-sdw.c +++ b/sound/soc/codecs/rt1318-sdw.c @@ -793,11 +793,9 @@ static int rt1318_sdw_probe(struct sdw_slave *slave, return rt1318_sdw_init(&slave->dev, regmap, slave); } -static int rt1318_sdw_remove(struct sdw_slave *slave) +static void rt1318_sdw_remove(struct sdw_slave *slave) { pm_runtime_disable(&slave->dev); - - return 0; } static const struct sdw_device_id rt1318_id[] = { diff --git a/sound/soc/codecs/rt1320-sdw.c b/sound/soc/codecs/rt1320-sdw.c index e3f9b03df3aae..d03e8dbd0cdaa 100644 --- a/sound/soc/codecs/rt1320-sdw.c +++ b/sound/soc/codecs/rt1320-sdw.c @@ -1740,11 +1740,9 @@ static int rt1320_sdw_probe(struct sdw_slave *slave, return rt1320_sdw_init(&slave->dev, regmap, mbq_regmap, slave); } -static int rt1320_sdw_remove(struct sdw_slave *slave) +static void rt1320_sdw_remove(struct sdw_slave *slave) { pm_runtime_disable(&slave->dev); - - return 0; } /* diff --git a/sound/soc/codecs/rt5682-sdw.c b/sound/soc/codecs/rt5682-sdw.c index 055bea0a4a3ba..fc464538ceffb 100644 --- a/sound/soc/codecs/rt5682-sdw.c +++ b/sound/soc/codecs/rt5682-sdw.c @@ -690,7 +690,7 @@ static int rt5682_sdw_probe(struct sdw_slave *slave, return rt5682_sdw_init(&slave->dev, regmap, slave); } -static int rt5682_sdw_remove(struct sdw_slave *slave) +static void rt5682_sdw_remove(struct sdw_slave *slave) { struct rt5682_priv *rt5682 = dev_get_drvdata(&slave->dev); @@ -698,8 +698,6 @@ static int rt5682_sdw_remove(struct sdw_slave *slave) cancel_delayed_work_sync(&rt5682->jack_detect_work); pm_runtime_disable(&slave->dev); - - return 0; } static const struct sdw_device_id rt5682_id[] = { diff --git a/sound/soc/codecs/rt700-sdw.c b/sound/soc/codecs/rt700-sdw.c index 44543c0da1772..9ce36a66fae1d 100644 --- a/sound/soc/codecs/rt700-sdw.c +++ b/sound/soc/codecs/rt700-sdw.c @@ -455,7 +455,7 @@ static int rt700_sdw_probe(struct sdw_slave *slave, return rt700_init(&slave->dev, sdw_regmap, regmap, slave); } -static int rt700_sdw_remove(struct sdw_slave *slave) +static void rt700_sdw_remove(struct sdw_slave *slave) { struct rt700_priv *rt700 = dev_get_drvdata(&slave->dev); @@ -465,8 +465,6 @@ static int rt700_sdw_remove(struct sdw_slave *slave) } pm_runtime_disable(&slave->dev); - - return 0; } static const struct sdw_device_id rt700_id[] = { diff --git a/sound/soc/codecs/rt711-sdca-sdw.c b/sound/soc/codecs/rt711-sdca-sdw.c index 6eb05871db379..49dacceddf815 100644 --- a/sound/soc/codecs/rt711-sdca-sdw.c +++ b/sound/soc/codecs/rt711-sdca-sdw.c @@ -365,7 +365,7 @@ static int rt711_sdca_sdw_probe(struct sdw_slave *slave, return rt711_sdca_init(&slave->dev, regmap, mbq_regmap, slave); } -static int rt711_sdca_sdw_remove(struct sdw_slave *slave) +static void rt711_sdca_sdw_remove(struct sdw_slave *slave) { struct rt711_sdca_priv *rt711 = dev_get_drvdata(&slave->dev); @@ -378,8 +378,6 @@ static int rt711_sdca_sdw_remove(struct sdw_slave *slave) mutex_destroy(&rt711->calibrate_mutex); mutex_destroy(&rt711->disable_irq_lock); - - return 0; } static const struct sdw_device_id rt711_sdca_id[] = { diff --git a/sound/soc/codecs/rt711-sdw.c b/sound/soc/codecs/rt711-sdw.c index 93a5a89a96b1e..72ddf4cebdf36 100644 --- a/sound/soc/codecs/rt711-sdw.c +++ b/sound/soc/codecs/rt711-sdw.c @@ -458,7 +458,7 @@ static int rt711_sdw_probe(struct sdw_slave *slave, return rt711_init(&slave->dev, sdw_regmap, regmap, slave); } -static int rt711_sdw_remove(struct sdw_slave *slave) +static void rt711_sdw_remove(struct sdw_slave *slave) { struct rt711_priv *rt711 = dev_get_drvdata(&slave->dev); @@ -472,8 +472,6 @@ static int rt711_sdw_remove(struct sdw_slave *slave) mutex_destroy(&rt711->calibrate_mutex); mutex_destroy(&rt711->disable_irq_lock); - - return 0; } static const struct sdw_device_id rt711_id[] = { diff --git a/sound/soc/codecs/rt712-sdca-dmic.c b/sound/soc/codecs/rt712-sdca-dmic.c index 2928649e80e4e..4d83544ef2049 100644 --- a/sound/soc/codecs/rt712-sdca-dmic.c +++ b/sound/soc/codecs/rt712-sdca-dmic.c @@ -960,11 +960,9 @@ static int rt712_sdca_dmic_sdw_probe(struct sdw_slave *slave, return rt712_sdca_dmic_init(&slave->dev, regmap, mbq_regmap, slave); } -static int rt712_sdca_dmic_sdw_remove(struct sdw_slave *slave) +static void rt712_sdca_dmic_sdw_remove(struct sdw_slave *slave) { pm_runtime_disable(&slave->dev); - - return 0; } static struct sdw_driver rt712_sdca_dmic_sdw_driver = { diff --git a/sound/soc/codecs/rt712-sdca-sdw.c b/sound/soc/codecs/rt712-sdca-sdw.c index ea07131edfa26..8c82887174db2 100644 --- a/sound/soc/codecs/rt712-sdca-sdw.c +++ b/sound/soc/codecs/rt712-sdca-sdw.c @@ -374,7 +374,7 @@ static int rt712_sdca_sdw_probe(struct sdw_slave *slave, return rt712_sdca_init(&slave->dev, regmap, mbq_regmap, slave); } -static int rt712_sdca_sdw_remove(struct sdw_slave *slave) +static void rt712_sdca_sdw_remove(struct sdw_slave *slave) { struct rt712_sdca_priv *rt712 = dev_get_drvdata(&slave->dev); @@ -387,8 +387,6 @@ static int rt712_sdca_sdw_remove(struct sdw_slave *slave) mutex_destroy(&rt712->calibrate_mutex); mutex_destroy(&rt712->disable_irq_lock); - - return 0; } static const struct sdw_device_id rt712_sdca_id[] = { diff --git a/sound/soc/codecs/rt715-sdca-sdw.c b/sound/soc/codecs/rt715-sdca-sdw.c index ce7d8955efc35..968bc183b8d8c 100644 --- a/sound/soc/codecs/rt715-sdca-sdw.c +++ b/sound/soc/codecs/rt715-sdca-sdw.c @@ -191,11 +191,9 @@ static int rt715_sdca_sdw_probe(struct sdw_slave *slave, return rt715_sdca_init(&slave->dev, mbq_regmap, regmap, slave); } -static int rt715_sdca_sdw_remove(struct sdw_slave *slave) +static void rt715_sdca_sdw_remove(struct sdw_slave *slave) { pm_runtime_disable(&slave->dev); - - return 0; } static const struct sdw_device_id rt715_sdca_id[] = { diff --git a/sound/soc/codecs/rt715-sdw.c b/sound/soc/codecs/rt715-sdw.c index a3df4bbedf864..49c91d015be4d 100644 --- a/sound/soc/codecs/rt715-sdw.c +++ b/sound/soc/codecs/rt715-sdw.c @@ -471,11 +471,9 @@ static int rt715_sdw_probe(struct sdw_slave *slave, return rt715_init(&slave->dev, sdw_regmap, regmap, slave); } -static int rt715_sdw_remove(struct sdw_slave *slave) +static void rt715_sdw_remove(struct sdw_slave *slave) { pm_runtime_disable(&slave->dev); - - return 0; } static const struct sdw_device_id rt715_id[] = { diff --git a/sound/soc/codecs/rt721-sdca-sdw.c b/sound/soc/codecs/rt721-sdca-sdw.c index 4d8a12b13015e..6eb8512975b85 100644 --- a/sound/soc/codecs/rt721-sdca-sdw.c +++ b/sound/soc/codecs/rt721-sdca-sdw.c @@ -415,7 +415,7 @@ static int rt721_sdca_sdw_probe(struct sdw_slave *slave, return rt721_sdca_init(&slave->dev, regmap, mbq_regmap, slave); } -static int rt721_sdca_sdw_remove(struct sdw_slave *slave) +static void rt721_sdca_sdw_remove(struct sdw_slave *slave) { struct rt721_sdca_priv *rt721 = dev_get_drvdata(&slave->dev); @@ -429,8 +429,6 @@ static int rt721_sdca_sdw_remove(struct sdw_slave *slave) mutex_destroy(&rt721->calibrate_mutex); mutex_destroy(&rt721->disable_irq_lock); - - return 0; } static const struct sdw_device_id rt721_sdca_id[] = { diff --git a/sound/soc/codecs/rt722-sdca-sdw.c b/sound/soc/codecs/rt722-sdca-sdw.c index a0f5601a262aa..0a5b3ffa90daf 100644 --- a/sound/soc/codecs/rt722-sdca-sdw.c +++ b/sound/soc/codecs/rt722-sdca-sdw.c @@ -428,7 +428,7 @@ static int rt722_sdca_sdw_probe(struct sdw_slave *slave, return rt722_sdca_init(&slave->dev, regmap, slave); } -static int rt722_sdca_sdw_remove(struct sdw_slave *slave) +static void rt722_sdca_sdw_remove(struct sdw_slave *slave) { struct rt722_sdca_priv *rt722 = dev_get_drvdata(&slave->dev); @@ -442,8 +442,6 @@ static int rt722_sdca_sdw_remove(struct sdw_slave *slave) mutex_destroy(&rt722->calibrate_mutex); mutex_destroy(&rt722->disable_irq_lock); - - return 0; } static const struct sdw_device_id rt722_sdca_id[] = { diff --git a/sound/soc/codecs/tas2783-sdw.c b/sound/soc/codecs/tas2783-sdw.c index 43b779873b93c..0b07981c3f2cc 100644 --- a/sound/soc/codecs/tas2783-sdw.c +++ b/sound/soc/codecs/tas2783-sdw.c @@ -1310,7 +1310,7 @@ static s32 tas_sdw_probe(struct sdw_slave *peripheral, return tas_init(tas_dev); } -static s32 tas_sdw_remove(struct sdw_slave *peripheral) +static void tas_sdw_remove(struct sdw_slave *peripheral) { struct tas2783_prv *tas_dev = dev_get_drvdata(&peripheral->dev); @@ -1319,8 +1319,6 @@ static s32 tas_sdw_remove(struct sdw_slave *peripheral) mutex_destroy(&tas_dev->calib_lock); mutex_destroy(&tas_dev->pde_lock); dev_set_drvdata(&peripheral->dev, NULL); - - return 0; } static const struct sdw_device_id tas_sdw_id[] = { diff --git a/sound/soc/codecs/wcd937x-sdw.c b/sound/soc/codecs/wcd937x-sdw.c index 1878d67e3fa10..7a18bed7f3471 100644 --- a/sound/soc/codecs/wcd937x-sdw.c +++ b/sound/soc/codecs/wcd937x-sdw.c @@ -1056,13 +1056,11 @@ static int wcd9370_probe(struct sdw_slave *pdev, return 0; } -static int wcd9370_remove(struct sdw_slave *pdev) +static void wcd9370_remove(struct sdw_slave *pdev) { struct device *dev = &pdev->dev; component_del(dev, &wcd_sdw_component_ops); - - return 0; } static const struct sdw_device_id wcd9370_slave_id[] = { diff --git a/sound/soc/codecs/wcd938x-sdw.c b/sound/soc/codecs/wcd938x-sdw.c index 8c8f39d049723..0f0cc0ac3056e 100644 --- a/sound/soc/codecs/wcd938x-sdw.c +++ b/sound/soc/codecs/wcd938x-sdw.c @@ -1217,13 +1217,11 @@ static int wcd9380_probe(struct sdw_slave *pdev, return 0; } -static int wcd9380_remove(struct sdw_slave *pdev) +static void wcd9380_remove(struct sdw_slave *pdev) { struct device *dev = &pdev->dev; component_del(dev, &wcd_sdw_component_ops); - - return 0; } static const struct sdw_device_id wcd9380_slave_id[] = { diff --git a/sound/soc/codecs/wcd939x-sdw.c b/sound/soc/codecs/wcd939x-sdw.c index da342a0c95a52..965c768e7995c 100644 --- a/sound/soc/codecs/wcd939x-sdw.c +++ b/sound/soc/codecs/wcd939x-sdw.c @@ -1414,7 +1414,7 @@ err_free_regmap: return ret; } -static int wcd9390_remove(struct sdw_slave *pdev) +static void wcd9390_remove(struct sdw_slave *pdev) { struct device *dev = &pdev->dev; struct wcd939x_sdw_priv *wcd = dev_get_drvdata(dev); @@ -1423,8 +1423,6 @@ static int wcd9390_remove(struct sdw_slave *pdev) if (wcd->regmap) regmap_exit(wcd->regmap); - - return 0; } static const struct sdw_device_id wcd9390_slave_id[] = {