On Sat, 6 May 2023 at 00:15, Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> wrote: > > dw_mci_pltfm_remove() returned zero unconditionally. Make it return void > instead which makes its semantics a bit clearer. > > Convert the drivers that use this function as .remove() callback to > .remove_new() which has the right prototype. This helps getting rid of > the platform_driver's remove callback that returns an int (which is > error prone). The other users didn't check the return value anyhow. > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> Applied for next, thanks! Kind regards Uffe > --- > drivers/mmc/host/dw_mmc-bluefield.c | 2 +- > drivers/mmc/host/dw_mmc-k3.c | 2 +- > drivers/mmc/host/dw_mmc-pltfm.c | 5 ++--- > drivers/mmc/host/dw_mmc-pltfm.h | 2 +- > drivers/mmc/host/dw_mmc-starfive.c | 2 +- > 5 files changed, 6 insertions(+), 7 deletions(-) > > diff --git a/drivers/mmc/host/dw_mmc-bluefield.c b/drivers/mmc/host/dw_mmc-bluefield.c > index 10baf122bc15..4747e5698f48 100644 > --- a/drivers/mmc/host/dw_mmc-bluefield.c > +++ b/drivers/mmc/host/dw_mmc-bluefield.c > @@ -52,7 +52,7 @@ static int dw_mci_bluefield_probe(struct platform_device *pdev) > > static struct platform_driver dw_mci_bluefield_pltfm_driver = { > .probe = dw_mci_bluefield_probe, > - .remove = dw_mci_pltfm_remove, > + .remove_new = dw_mci_pltfm_remove, > .driver = { > .name = "dwmmc_bluefield", > .probe_type = PROBE_PREFER_ASYNCHRONOUS, > diff --git a/drivers/mmc/host/dw_mmc-k3.c b/drivers/mmc/host/dw_mmc-k3.c > index 0311a37dd4ab..e8ee7c43f60b 100644 > --- a/drivers/mmc/host/dw_mmc-k3.c > +++ b/drivers/mmc/host/dw_mmc-k3.c > @@ -470,7 +470,7 @@ static const struct dev_pm_ops dw_mci_k3_dev_pm_ops = { > > static struct platform_driver dw_mci_k3_pltfm_driver = { > .probe = dw_mci_k3_probe, > - .remove = dw_mci_pltfm_remove, > + .remove_new = dw_mci_pltfm_remove, > .driver = { > .name = "dwmmc_k3", > .probe_type = PROBE_PREFER_ASYNCHRONOUS, > diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c > index 13e55cff8237..567dce73f205 100644 > --- a/drivers/mmc/host/dw_mmc-pltfm.c > +++ b/drivers/mmc/host/dw_mmc-pltfm.c > @@ -122,18 +122,17 @@ static int dw_mci_pltfm_probe(struct platform_device *pdev) > return dw_mci_pltfm_register(pdev, drv_data); > } > > -int dw_mci_pltfm_remove(struct platform_device *pdev) > +void dw_mci_pltfm_remove(struct platform_device *pdev) > { > struct dw_mci *host = platform_get_drvdata(pdev); > > dw_mci_remove(host); > - return 0; > } > EXPORT_SYMBOL_GPL(dw_mci_pltfm_remove); > > static struct platform_driver dw_mci_pltfm_driver = { > .probe = dw_mci_pltfm_probe, > - .remove = dw_mci_pltfm_remove, > + .remove_new = dw_mci_pltfm_remove, > .driver = { > .name = "dw_mmc", > .probe_type = PROBE_PREFER_ASYNCHRONOUS, > diff --git a/drivers/mmc/host/dw_mmc-pltfm.h b/drivers/mmc/host/dw_mmc-pltfm.h > index 2d50d7da2e36..64cf7522a3d4 100644 > --- a/drivers/mmc/host/dw_mmc-pltfm.h > +++ b/drivers/mmc/host/dw_mmc-pltfm.h > @@ -10,7 +10,7 @@ > > extern int dw_mci_pltfm_register(struct platform_device *pdev, > const struct dw_mci_drv_data *drv_data); > -extern int dw_mci_pltfm_remove(struct platform_device *pdev); > +extern void dw_mci_pltfm_remove(struct platform_device *pdev); > extern const struct dev_pm_ops dw_mci_pltfm_pmops; > > #endif /* _DW_MMC_PLTFM_H_ */ > diff --git a/drivers/mmc/host/dw_mmc-starfive.c b/drivers/mmc/host/dw_mmc-starfive.c > index dab1508bf83c..fd05a648a8bb 100644 > --- a/drivers/mmc/host/dw_mmc-starfive.c > +++ b/drivers/mmc/host/dw_mmc-starfive.c > @@ -172,7 +172,7 @@ static int dw_mci_starfive_probe(struct platform_device *pdev) > > static struct platform_driver dw_mci_starfive_driver = { > .probe = dw_mci_starfive_probe, > - .remove = dw_mci_pltfm_remove, > + .remove_new = dw_mci_pltfm_remove, > .driver = { > .name = "dwmmc_starfive", > .probe_type = PROBE_PREFER_ASYNCHRONOUS, > > base-commit: 457391b0380335d5e9a5babdec90ac53928b23b4 > -- > 2.39.2 >