Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: dw_mmc: Make dw_mci_pltfm_remove() return void

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@pengutronix.de>
Link: https://lore.kernel.org/r/20230505221506.1247424-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Uwe Kleine-König and committed by
Ulf Hansson
982fe2e0 2fba941d

+6 -7
+1 -1
drivers/mmc/host/dw_mmc-bluefield.c
··· 52 52 53 53 static struct platform_driver dw_mci_bluefield_pltfm_driver = { 54 54 .probe = dw_mci_bluefield_probe, 55 - .remove = dw_mci_pltfm_remove, 55 + .remove_new = dw_mci_pltfm_remove, 56 56 .driver = { 57 57 .name = "dwmmc_bluefield", 58 58 .probe_type = PROBE_PREFER_ASYNCHRONOUS,
+1 -1
drivers/mmc/host/dw_mmc-k3.c
··· 470 470 471 471 static struct platform_driver dw_mci_k3_pltfm_driver = { 472 472 .probe = dw_mci_k3_probe, 473 - .remove = dw_mci_pltfm_remove, 473 + .remove_new = dw_mci_pltfm_remove, 474 474 .driver = { 475 475 .name = "dwmmc_k3", 476 476 .probe_type = PROBE_PREFER_ASYNCHRONOUS,
+2 -3
drivers/mmc/host/dw_mmc-pltfm.c
··· 121 121 return dw_mci_pltfm_register(pdev, drv_data); 122 122 } 123 123 124 - int dw_mci_pltfm_remove(struct platform_device *pdev) 124 + void dw_mci_pltfm_remove(struct platform_device *pdev) 125 125 { 126 126 struct dw_mci *host = platform_get_drvdata(pdev); 127 127 128 128 dw_mci_remove(host); 129 - return 0; 130 129 } 131 130 EXPORT_SYMBOL_GPL(dw_mci_pltfm_remove); 132 131 133 132 static struct platform_driver dw_mci_pltfm_driver = { 134 133 .probe = dw_mci_pltfm_probe, 135 - .remove = dw_mci_pltfm_remove, 134 + .remove_new = dw_mci_pltfm_remove, 136 135 .driver = { 137 136 .name = "dw_mmc", 138 137 .probe_type = PROBE_PREFER_ASYNCHRONOUS,
+1 -1
drivers/mmc/host/dw_mmc-pltfm.h
··· 10 10 11 11 extern int dw_mci_pltfm_register(struct platform_device *pdev, 12 12 const struct dw_mci_drv_data *drv_data); 13 - extern int dw_mci_pltfm_remove(struct platform_device *pdev); 13 + extern void dw_mci_pltfm_remove(struct platform_device *pdev); 14 14 extern const struct dev_pm_ops dw_mci_pltfm_pmops; 15 15 16 16 #endif /* _DW_MMC_PLTFM_H_ */
+1 -1
drivers/mmc/host/dw_mmc-starfive.c
··· 172 172 173 173 static struct platform_driver dw_mci_starfive_driver = { 174 174 .probe = dw_mci_starfive_probe, 175 - .remove = dw_mci_pltfm_remove, 175 + .remove_new = dw_mci_pltfm_remove, 176 176 .driver = { 177 177 .name = "dwmmc_starfive", 178 178 .probe_type = PROBE_PREFER_ASYNCHRONOUS,