platform/kernel/linux-rpi.git
11 months agommc: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:46 +0000 (15:00 +0800)]
mmc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Florian Fainelli <florian.fainelli@broadcom.com> # Broadcom
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-57-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: renesas_sdhi: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:45 +0000 (15:00 +0800)]
mmc: renesas_sdhi: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230727070051.17778-56-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: pwrseq: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:44 +0000 (15:00 +0800)]
mmc: pwrseq: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-55-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: pwrseq: sd8787: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:43 +0000 (15:00 +0800)]
mmc: pwrseq: sd8787: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-54-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: pwrseq_simple: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:42 +0000 (15:00 +0800)]
mmc: pwrseq_simple: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-53-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: mvsdio: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:41 +0000 (15:00 +0800)]
mmc: mvsdio: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-52-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: mxcmmc: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:40 +0000 (15:00 +0800)]
mmc: mxcmmc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-51-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-spear: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:39 +0000 (15:00 +0800)]
mmc: sdhci-spear: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-50-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sunplus-mmc: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:38 +0000 (15:00 +0800)]
mmc: sunplus-mmc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-49-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-esdhc-mcf: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:37 +0000 (15:00 +0800)]
mmc: sdhci-esdhc-mcf: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Angelo Dureghello <angelo.dureghello@timesys.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-48-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: wmt-sdmmc: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:36 +0000 (15:00 +0800)]
mmc: wmt-sdmmc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-47-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-st: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:35 +0000 (15:00 +0800)]
mmc: sdhci-st: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-46-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: atmel-mci: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:34 +0000 (15:00 +0800)]
mmc: atmel-mci: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Link: https://lore.kernel.org/r/20230727070051.17778-45-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: usdhi60rol0: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:33 +0000 (15:00 +0800)]
mmc: usdhi60rol0: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Link: https://lore.kernel.org/r/20230727070051.17778-44-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: wbsd: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:32 +0000 (15:00 +0800)]
mmc: wbsd: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-43-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: owl: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:31 +0000 (15:00 +0800)]
mmc: owl: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-42-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: dw_mmc: rockchip: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:30 +0000 (15:00 +0800)]
mmc: dw_mmc: rockchip: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20230727070051.17778-41-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: alcor: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:29 +0000 (15:00 +0800)]
mmc: alcor: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-40-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-msm: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:28 +0000 (15:00 +0800)]
mmc: sdhci-msm: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-39-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-esdhc-imx: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:27 +0000 (15:00 +0800)]
mmc: sdhci-esdhc-imx: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-38-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-acpi: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:26 +0000 (15:00 +0800)]
mmc: sdhci-acpi: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-37-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-tegra: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:25 +0000 (15:00 +0800)]
mmc: sdhci-tegra: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-36-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-sprd: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:24 +0000 (15:00 +0800)]
mmc: sdhci-sprd: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Chunyan Zhang <zhang.lyra@gmail.com>
Link: https://lore.kernel.org/r/20230727070051.17778-35-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: meson-mx-sdio: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:23 +0000 (15:00 +0800)]
mmc: meson-mx-sdio: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20230727070051.17778-34-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-of-aspeed: Convert to platform remove
Yangtao Li [Thu, 27 Jul 2023 07:00:22 +0000 (15:00 +0800)]
mmc: sdhci-of-aspeed: Convert to platform remove

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-33-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-of-aspeed: remove unneeded variables
Yangtao Li [Thu, 27 Jul 2023 07:00:21 +0000 (15:00 +0800)]
mmc: sdhci-of-aspeed: remove unneeded variables

The variable 'dead' is redundant, let's remove it.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230727070051.17778-32-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-omap: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:20 +0000 (15:00 +0800)]
mmc: sdhci-omap: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-31-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: moxart: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:19 +0000 (15:00 +0800)]
mmc: moxart: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-30-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: pxamci: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:18 +0000 (15:00 +0800)]
mmc: pxamci: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-29-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: cavium-octeon: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:17 +0000 (15:00 +0800)]
mmc: cavium-octeon: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-28-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: au1xmmc: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:16 +0000 (15:00 +0800)]
mmc: au1xmmc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-27-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-of-dwcmshc: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:15 +0000 (15:00 +0800)]
mmc: sdhci-of-dwcmshc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-26-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-of-arasan: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:14 +0000 (15:00 +0800)]
mmc: sdhci-of-arasan: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20230727070051.17778-25-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: mxs-mmc: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:13 +0000 (15:00 +0800)]
mmc: mxs-mmc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-24-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: rtsx_usb_sdmmc: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:12 +0000 (15:00 +0800)]
mmc: rtsx_usb_sdmmc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-23-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: meson-mx-sdhc: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:11 +0000 (15:00 +0800)]
mmc: meson-mx-sdhc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20230727070051.17778-22-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-s3c: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:10 +0000 (15:00 +0800)]
mmc: sdhci-s3c: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20230727070051.17778-21-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: xenon: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:09 +0000 (15:00 +0800)]
mmc: xenon: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-20-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: meson-gx: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:08 +0000 (15:00 +0800)]
mmc: meson-gx: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20230727070051.17778-19-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sh_mmcif: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:07 +0000 (15:00 +0800)]
mmc: sh_mmcif: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-18-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: rtsx_pci: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:06 +0000 (15:00 +0800)]
mmc: rtsx_pci: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-17-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: rtsx_pci: Drop if block with always false condition
Yangtao Li [Thu, 27 Jul 2023 07:00:05 +0000 (15:00 +0800)]
mmc: rtsx_pci: Drop if block with always false condition

rtsx_pci_sdmmc_drv_remove() is only called for a device after
rtsx_pci_sdmmc_drv_probe() returned 0. In that case platform_set_drvdata()
was called with a non-NULL value and so platform_get_drvdata()
won't return NULL.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230727070051.17778-16-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-pxav3: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:04 +0000 (15:00 +0800)]
mmc: sdhci-pxav3: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-15-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: dw_mmc: exynos: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:03 +0000 (15:00 +0800)]
mmc: dw_mmc: exynos: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-14-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: omap: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:02 +0000 (15:00 +0800)]
mmc: omap: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-13-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-of-at91: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:01 +0000 (15:00 +0800)]
mmc: sdhci-of-at91: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Link: https://lore.kernel.org/r/20230727070051.17778-12-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: omap_hsmmc: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 07:00:00 +0000 (15:00 +0800)]
mmc: omap_hsmmc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-11-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci: milbeaut: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 06:59:59 +0000 (14:59 +0800)]
mmc: sdhci: milbeaut: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-10-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-pic32: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 06:59:58 +0000 (14:59 +0800)]
mmc: sdhci-pic32: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230727070051.17778-9-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: dw_mmc: hi3798cv200: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 06:59:57 +0000 (14:59 +0800)]
mmc: dw_mmc: hi3798cv200: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-8-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: davinci_mmc: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 06:59:56 +0000 (14:59 +0800)]
mmc: davinci_mmc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230727070051.17778-7-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: cb710: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 06:59:55 +0000 (14:59 +0800)]
mmc: cb710: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Link: https://lore.kernel.org/r/20230727070051.17778-6-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: mtk-sd: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 06:59:54 +0000 (14:59 +0800)]
mmc: mtk-sd: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230727070051.17778-5-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: litex_mmc: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 06:59:53 +0000 (14:59 +0800)]
mmc: litex_mmc: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Gabriel Somlo <gsomlo@gmail.com>
Link: https://lore.kernel.org/r/20230727070051.17778-4-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: jz4740: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 06:59:52 +0000 (14:59 +0800)]
mmc: jz4740: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/20230727070051.17778-3-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: bcm2835: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 06:59:51 +0000 (14:59 +0800)]
mmc: bcm2835: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/r/20230727070051.17778-2-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sunxi: Convert to platform remove callback returning void
Yangtao Li [Thu, 27 Jul 2023 06:59:50 +0000 (14:59 +0800)]
mmc: sunxi: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20230727070051.17778-1-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: core: Cleanup mmc_sd_num_wr_blocks() function
Victor Shih [Fri, 11 Aug 2023 10:14:04 +0000 (18:14 +0800)]
mmc: core: Cleanup mmc_sd_num_wr_blocks() function

Use mmc_app_cmd() to avoid open-coding in mmc_sd_num_wr_blocks().

Signed-off-by: Victor Shih <victor.shih@genesyslogic.com.tw>
Link: https://lore.kernel.org/r/20230811101404.4463-1-victorshihgli@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-pci-o2micro: add Bayhub new chip GG8 support for express card
Chevron Li [Fri, 11 Aug 2023 03:35:17 +0000 (11:35 +0800)]
mmc: sdhci-pci-o2micro: add Bayhub new chip GG8 support for express card

Add Bayhub new chip GG8 support for SD express card.
This patch depends on patch 1/2.

Signed-off-by: Chevron Li <chevron.li@bayhubtech.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230811033517.11532-2-chevron_li@126.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-pci-o2micro: add Bayhub new chip GG8 support for UHS-I
Chevron Li [Fri, 11 Aug 2023 03:35:16 +0000 (11:35 +0800)]
mmc: sdhci-pci-o2micro: add Bayhub new chip GG8 support for UHS-I

Add Bayhub new chip GG8 support for UHS-I function

Signed-off-by: Chevron Li <chevron.li@bayhubtech.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230811033517.11532-1-chevron_li@126.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agodt-bindings: mmc: Fix reference to pwr-seq-simple
Guido Günther [Wed, 9 Aug 2023 18:50:11 +0000 (20:50 +0200)]
dt-bindings: mmc: Fix reference to pwr-seq-simple

It's a YAML file nowadays.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Link: https://lore.kernel.org/r/d7a0be6a2688a9829077cc21ca4a5bf9528f9eb1.1691606520.git.agx@sigxcpu.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: remove unnecessary set_drvdata() function
Yang Yingliang [Tue, 8 Aug 2023 12:15:13 +0000 (20:15 +0800)]
mmc: remove unnecessary set_drvdata() function

The driver data will be cleared in device_unbind_cleanup() in driver
core code. So the set_drvdata(..., NULL) called in remove and error
path in probe can be removed.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20230808121513.553143-1-yangyingliang@huawei.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sunplus: Fix platform_get_irq() error checking
Harshit Mogalapalli [Wed, 9 Aug 2023 07:18:12 +0000 (00:18 -0700)]
mmc: sunplus: Fix platform_get_irq() error checking

The platform_get_irq() function returns negative error codes on failure.

Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20230809071812.547229-2-harshit.m.mogalapalli@oracle.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: Merge branch fixes into next
Ulf Hansson [Wed, 9 Aug 2023 13:39:50 +0000 (15:39 +0200)]
mmc: Merge branch fixes into next

Merge the mmc fixes for v6.5-rc[n] into the next branch, to allow them to
get tested together with the new mmc changes that are targeted for v6.6.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci: milbeaut: remove redundant of_match_ptr()
Zhu Wang [Tue, 8 Aug 2023 13:37:14 +0000 (21:37 +0800)]
mmc: sdhci: milbeaut: remove redundant of_match_ptr()

The driver depends on CONFIG_OF, so it is not necessary to use
of_match_ptr() here. We remove of_match_ptr() here.

Signed-off-by: Zhu Wang <wangzhu9@huawei.com>
Link: https://lore.kernel.org/r/20230808133714.214914-3-wangzhu9@huawei.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-spear: remove redundant of_match_ptr()
Zhu Wang [Tue, 8 Aug 2023 13:37:13 +0000 (21:37 +0800)]
mmc: sdhci-spear: remove redundant of_match_ptr()

The driver depends on CONFIG_OF, so it is not necessary to use
of_match_ptr() here. We remove both CONFIG_OF and of_match_ptr() here.

Signed-off-by: Zhu Wang <wangzhu9@huawei.com>
Link: https://lore.kernel.org/r/20230808133714.214914-2-wangzhu9@huawei.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agodt-bindings: mmc: arasan,sdci: Add power-domains and iommus properties
Michal Simek [Thu, 3 Aug 2023 07:22:56 +0000 (09:22 +0200)]
dt-bindings: mmc: arasan,sdci: Add power-domains and iommus properties

ZynqMP SDHCI Arasan IP core has own power domain and also iommu ID that's
why describe optional power-domains and iommus properties.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/bf912d5f5e74b43903a84262565f564bfe0fed7e.1691047370.git.michal.simek@amd.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sdhci-st: Use devm_platform_ioremap_resource_byname()
Li Zetao [Wed, 2 Aug 2023 09:40:28 +0000 (17:40 +0800)]
mmc: sdhci-st: Use devm_platform_ioremap_resource_byname()

Convert platform_get_resource_byname() + devm_ioremap_resource() to a
single call to devm_platform_ioremap_resource_byname(), as this is
exactly what this function does.

Signed-off-by: Li Zetao <lizetao1@huawei.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230802094028.976612-1-lizetao1@huawei.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agodt-bindings: sdhci-of-at91: add microchip,sam9x7-sdhci
Varshini Rajendran [Fri, 28 Jul 2023 10:26:16 +0000 (15:56 +0530)]
dt-bindings: sdhci-of-at91: add microchip,sam9x7-sdhci

Add microchip,sam9x7-sdhci to DT bindings documentation.

Signed-off-by: Varshini Rajendran <varshini.rajendran@microchip.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230728102616.266235-1-varshini.rajendran@microchip.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: core: propagate removable attribute to driver core
Thomas Weißschuh [Tue, 25 Jul 2023 14:17:25 +0000 (16:17 +0200)]
mmc: core: propagate removable attribute to driver core

Userspace can use this to distinguish hotpluggable mmc devices such as
sdcards from non-hotpluggable ones such as eMMC.
One example is the lsblk tool from util-linux.

Note that dev_set_removable() is not related to GENHD_FL_REMOVABLE which
is not applicable as per the comment in drivers/mmc/core/block.c

Link: https://github.com/util-linux/util-linux/issues/2379
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Link: https://lore.kernel.org/r/20230725-mmc-removable-v1-1-b2e0c4f18e6d@weissschuh.net
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: Explicitly include correct DT includes
Rob Herring [Tue, 18 Jul 2023 14:30:52 +0000 (08:30 -0600)]
mmc: Explicitly include correct DT includes

The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230718143054.1065288-1-robh@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: uniphier-sd: register irqs before registering controller
Wolfram Sang [Wed, 12 Jul 2023 14:13:27 +0000 (16:13 +0200)]
mmc: uniphier-sd: register irqs before registering controller

IRQs should be ready to serve when we call mmc_add_host() via
tmio_mmc_host_probe(). To achieve that, ensure that all irqs are masked
before registering the handlers.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20230712141327.20827-1-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: davinci: Make SDIO irq truly optional
Julien Delbergue [Thu, 13 Jul 2023 09:31:08 +0000 (11:31 +0200)]
mmc: davinci: Make SDIO irq truly optional

The following error is printed on Logic PD's DA850 EVM:
  davinci_mmc 1c40000.mmc: error -ENXIO: IRQ index 1 not found

Depending on the board, the SDIO interrupt may not be present, so use
the correct function to reflect that and prevent logging an error.

Signed-off-by: Julien Delbergue <j.delbergue.foss@gmail.com>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/8b57db8d-1d3a-883e-eb8f-ddf15f19d823@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: pxamci: Use devm_platform_get_and_ioremap_resource()
Yangtao Li [Tue, 4 Jul 2023 13:19:38 +0000 (21:19 +0800)]
mmc: pxamci: Use devm_platform_get_and_ioremap_resource()

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230704131939.22562-3-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: omap_hsmmc: Use devm_platform_get_and_ioremap_resource()
Yangtao Li [Tue, 4 Jul 2023 13:19:37 +0000 (21:19 +0800)]
mmc: omap_hsmmc: Use devm_platform_get_and_ioremap_resource()

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230704131939.22562-2-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: mxcmmc: Use devm_platform_get_and_ioremap_resource()
Yangtao Li [Tue, 4 Jul 2023 13:19:36 +0000 (21:19 +0800)]
mmc: mxcmmc: Use devm_platform_get_and_ioremap_resource()

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230704131939.22562-1-frank.li@vivo.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: renesas_sdhi: remove outdated indentation
Wolfram Sang [Wed, 12 Jul 2023 14:01:15 +0000 (16:01 +0200)]
mmc: renesas_sdhi: remove outdated indentation

Using tabs to make a structure initialization more readable is not
considered helpful. Remove the final appearance from this driver.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230712140116.18718-1-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: renesas_sdhi: register irqs before registering controller
Wolfram Sang [Wed, 12 Jul 2023 14:00:11 +0000 (16:00 +0200)]
mmc: renesas_sdhi: register irqs before registering controller

IRQs should be ready to serve when we call mmc_add_host() via
tmio_mmc_host_probe(). To achieve that, ensure that all irqs are masked
before registering the handlers.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230712140011.18602-1-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agodt-bindings: mmc: mtk-sd: drop assigned-clocks/clock-parents
Frank Wunderlich [Thu, 29 Jun 2023 18:43:17 +0000 (20:43 +0200)]
dt-bindings: mmc: mtk-sd: drop assigned-clocks/clock-parents

MT7986 has 2 clock-parents and these properties are not needed in driver
binding. So drop them completely.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20230629184318.551317-2-linux@fw-web.de
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: mmci: Improve ux500 debug prints
Linus Walleij [Wed, 28 Jun 2023 19:12:43 +0000 (21:12 +0200)]
mmc: mmci: Improve ux500 debug prints

To conclude the ux500 busy timeout fixes, this improves the debug and
error prints so we can see a bit what is going on. Here is a typical
dmesg with these new debug messages enabled:

[    2.648864] mmci-pl18x 80005000.mmc: mmc2: PL180 manf 80 rev4
             at 0x80005000 irq 81,0 (pio)
[    2.662750] mmci-pl18x 80005000.mmc: DMA channels RX dma0chan4, TX dma0chan5
[    3.480407] mmci-pl18x 80005000.mmc: no busy signalling in time CMD06
[    3.487457] mmci-pl18x 80005000.mmc: no busy signalling in time CMD06
[    3.998321] mmci-pl18x 80005000.mmc: timeout in state waiting for end IRQ
                 waiting for busy CMD06
[    3.998535] mmc2: new DDR MMC card at address 0001
[    4.000030] mmcblk2: mmc2:0001 M4G1YC 3.69 GiB
[    4.008361]  mmcblk2: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15
       p16 p17 p18 p19 p20 p21 p22 p23 p24 p25
[    4.017700] mmcblk2boot0: mmc2:0001 M4G1YC 2.00 MiB
[    4.020477] mmcblk2boot1: mmc2:0001 M4G1YC 2.00 MiB
[    4.022125] mmcblk2rpmb: mmc2:0001 M4G1YC 128 KiB, chardev (246:0)
[    5.791381] mmci-pl18x 80005000.mmc: no busy signalling in time CMD06
[   10.938568] mmci-pl18x 80005000.mmc: timeout in state waiting for end IRQ
                waiting for busy CMD06
[   17.982849] mmci-pl18x 80005000.mmc: lost busy status when waiting for
                busy start IRQ CMD06
[   18.683563] mmci-pl18x 80005000.mmc: no busy signalling in time CMD06
[   19.385437] mmci-pl18x 80005000.mmc: no busy signalling in time CMD06
[   20.493652] mmci-pl18x 80005000.mmc: no busy signalling in time CMD06

We see a lot of lost IRQs and the timeout always occur while waiting for
the end IRQ, and then the busy status is *low* meaning the busy indication
is already de-asserted.

So busy signalling is missed in various ways for various reasons,
sometimes it appears that IRQs are simply lost.

One hypothesis is that this happens because the events happen so fast
that they are transient, and since the MMCI state machine in effect is
handling an edge trigger (rising or falling signal on DAT0) the
internal logic will miss the event, because the state machine in the
hardware is sampling the line, and will at times detect only the first
event but miss the second, fireing only one IRQ.

We print the second timeout error with dev_err() since it is pretty
serious, the other events are so common and simple to handle that we
can keep them at dev_dbg() level.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230628191243.3632401-1-linus.walleij@linaro.org
[Ulf: Fixup conflict in ux500_busy_timeout_work()]
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: meson-gx: Drop redundant WARN_ON() in the irq handler
Ulf Hansson [Thu, 22 Jun 2023 10:53:27 +0000 (12:53 +0200)]
mmc: meson-gx: Drop redundant WARN_ON() in the irq handler

The host pointer is already being dereferenced earlier, so let's just drop
the redundant WARN_ON.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20230622105327.77296-1-ulf.hansson@linaro.org
11 months agommc: sunplus: Fix error handling in spmmc_drv_probe()
Harshit Mogalapalli [Wed, 9 Aug 2023 07:18:11 +0000 (00:18 -0700)]
mmc: sunplus: Fix error handling in spmmc_drv_probe()

When mmc allocation succeeds, the error paths are not freeing mmc.

Fix the above issue by changing mmc_alloc_host() to devm_mmc_alloc_host()
to simplify the error handling. Remove label 'probe_free_host' as devm_*
api takes care of freeing, also remove mmc_free_host() from remove
function as devm_* takes care of freeing.

Fixes: 4e268fed8b18 ("mmc: Add mmc driver for Sunplus SP7021")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/a3829ed3-d827-4b9d-827e-9cc24a3ec3bc@moroto.mountain/
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230809071812.547229-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: sunplus: fix return value check of mmc_add_host()
Wei Chen [Thu, 22 Jun 2023 09:02:33 +0000 (09:02 +0000)]
mmc: sunplus: fix return value check of mmc_add_host()

mmc_add_host() may return error, if we ignore its return value,
1. the memory allocated in mmc_alloc_host() will be leaked
2. null-ptr-deref will happen when calling mmc_remove_host()
in remove function spmmc_drv_remove() because deleting not
added device.

Fix this by checking the return value of mmc_add_host(). Moreover,
I fixed the error handling path of spmmc_drv_probe() to clean up.

Fixes: 4e268fed8b18 ("mmc: Add mmc driver for Sunplus SP7021")
Cc: stable@vger.kernel.org
Signed-off-by: Wei Chen <harperchen1110@gmail.com>
Link: https://lore.kernel.org/r/20230622090233.188539-1-harperchen1110@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: wbsd: fix double mmc_free_host() in wbsd_init()
Yang Yingliang [Mon, 7 Aug 2023 12:44:42 +0000 (20:44 +0800)]
mmc: wbsd: fix double mmc_free_host() in wbsd_init()

mmc_free_host() has already be called in wbsd_free_mmc(),
remove the mmc_free_host() in error path in wbsd_init().

Fixes: dc5b9b50fc9d ("mmc: wbsd: fix return value check of mmc_add_host()")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230807124443.3431366-1-yangyingliang@huawei.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agommc: block: Fix in_flight[issue_type] value error
Yibin Ding [Wed, 2 Aug 2023 02:30:23 +0000 (10:30 +0800)]
mmc: block: Fix in_flight[issue_type] value error

For a completed request, after the mmc_blk_mq_complete_rq(mq, req)
function is executed, the bitmap_tags corresponding to the
request will be cleared, that is, the request will be regarded as
idle. If the request is acquired by a different type of process at
this time, the issue_type of the request may change. It further
caused the value of mq->in_flight[issue_type] to be abnormal,
and a large number of requests could not be sent.

p1:       p2:
mmc_blk_mq_complete_rq
  blk_mq_free_request
      blk_mq_get_request
        blk_mq_rq_ctx_init
mmc_blk_mq_dec_in_flight
  mmc_issue_type(mq, req)

This strategy can ensure the consistency of issue_type
before and after executing mmc_blk_mq_complete_rq.

Fixes: 81196976ed94 ("mmc: block: Add blk-mq support")
Cc: stable@vger.kernel.org
Signed-off-by: Yibin Ding <yibin.ding@unisoc.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230802023023.1318134-1-yunlong.xing@unisoc.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
11 months agoLinux 6.5-rc5
Linus Torvalds [Sun, 6 Aug 2023 22:07:51 +0000 (15:07 -0700)]
Linux 6.5-rc5

11 months agoMerge tag 'v6.5-rc5.vfs.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
Linus Torvalds [Sun, 6 Aug 2023 17:43:52 +0000 (10:43 -0700)]
Merge tag 'v6.5-rc5.vfs.fixes' of git://git./linux/kernel/git/vfs/vfs

Pull vfs fixes from Christian Brauner:

 - Fix a wrong check for O_TMPFILE during RESOLVE_CACHED lookup

 - Clean up directory iterators and clarify file_needs_f_pos_lock()

* tag 'v6.5-rc5.vfs.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
  fs: rely on ->iterate_shared to determine f_pos locking
  vfs: get rid of old '->iterate' directory operation
  proc: fix missing conversion to 'iterate_shared'
  open: make RESOLVE_CACHED correctly test for O_TMPFILE

11 months agofs: rely on ->iterate_shared to determine f_pos locking
Christian Brauner [Sun, 6 Aug 2023 12:49:35 +0000 (14:49 +0200)]
fs: rely on ->iterate_shared to determine f_pos locking

Now that we removed ->iterate we don't need to check for either
->iterate or ->iterate_shared in file_needs_f_pos_lock(). Simply check
for ->iterate_shared instead. This will tell us whether we need to
unconditionally take the lock. Not just does it allow us to avoid
checking f_inode's mode it also actually clearly shows that we're
locking because of readdir.

Signed-off-by: Christian Brauner <brauner@kernel.org>
11 months agovfs: get rid of old '->iterate' directory operation
Linus Torvalds [Sat, 5 Aug 2023 19:25:01 +0000 (12:25 -0700)]
vfs: get rid of old '->iterate' directory operation

All users now just use '->iterate_shared()', which only takes the
directory inode lock for reading.

Filesystems that never got convered to shared mode now instead use a
wrapper that drops the lock, re-takes it in write mode, calls the old
function, and then downgrades the lock back to read mode.

This way the VFS layer and other callers no longer need to care about
filesystems that never got converted to the modern era.

The filesystems that use the new wrapper are ceph, coda, exfat, jfs,
ntfs, ocfs2, overlayfs, and vboxsf.

Honestly, several of them look like they really could just iterate their
directories in shared mode and skip the wrapper entirely, but the point
of this change is to not change semantics or fix filesystems that
haven't been fixed in the last 7+ years, but to finally get rid of the
dual iterators.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
11 months agoproc: fix missing conversion to 'iterate_shared'
Linus Torvalds [Sat, 5 Aug 2023 17:49:31 +0000 (10:49 -0700)]
proc: fix missing conversion to 'iterate_shared'

I'm looking at the directory handling due to the discussion about f_pos
locking (see commit 797964253d35: "file: reinstate f_pos locking
optimization for regular files"), and wanting to clean that up.

And one source of ugliness is how we were supposed to move filesystems
over to the '->iterate_shared()' function that only takes the inode lock
for reading many many years ago, but several filesystems still use the
bad old '->iterate()' that takes the inode lock for exclusive access.

See commit 6192269444eb ("introduce a parallel variant of ->iterate()")
that also added some documentation stating

      Old method is only used if the new one is absent; eventually it will
      be removed.  Switch while you still can; the old one won't stay.

and that was back in April 2016.  Here we are, many years later, and the
old version is still clearly sadly alive and well.

Now, some of those old style iterators are probably just because the
filesystem may end up having per-inode mutable data that it uses for
iterating a directory, but at least one case is just a mistake.

Al switched over most filesystems to use '->iterate_shared()' back when
it was introduced.  In particular, the /proc filesystem was converted as
one of the first ones in commit f50752eaa0b0 ("switch all procfs
directories ->iterate_shared()").

But then later one new user of '->iterate()' was then re-introduced by
commit 6d9c939dbe4d ("procfs: add smack subdir to attrs").

And that's clearly not what we wanted, since that new case just uses the
same 'proc_pident_readdir()' and 'proc_pident_lookup()' helper functions
that other /proc pident directories use, and they are most definitely
safe to use with the inode lock held shared.

So just fix it.

This still leaves a fair number of oddball filesystems using the
old-style directory iterator (ceph, coda, exfat, jfs, ntfs, ocfs2,
overlayfs, and vboxsf), but at least we don't have any remaining in the
core filesystems.

I'm going to add a wrapper function that just drops the read-lock and
takes it as a write lock, so that we can clean up the core vfs layer and
make all the ugly 'this filesystem needs exclusive inode locking' be
just filesystem-internal warts.

I just didn't want to make that conversion when we still had a core user
left.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
11 months agoopen: make RESOLVE_CACHED correctly test for O_TMPFILE
Aleksa Sarai [Sat, 5 Aug 2023 16:11:58 +0000 (02:11 +1000)]
open: make RESOLVE_CACHED correctly test for O_TMPFILE

O_TMPFILE is actually __O_TMPFILE|O_DIRECTORY. This means that the old
fast-path check for RESOLVE_CACHED would reject all users passing
O_DIRECTORY with -EAGAIN, when in fact the intended test was to check
for __O_TMPFILE.

Cc: stable@vger.kernel.org # v5.12+
Fixes: 99668f618062 ("fs: expose LOOKUP_CACHED through openat2() RESOLVE_CACHED")
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Message-Id: <20230806-resolve_cached-o_tmpfile-v1-1-7ba16308465e@cyphar.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
11 months agoMerge tag 'rust-fixes-6.5-rc5' of https://github.com/Rust-for-Linux/linux
Linus Torvalds [Sun, 6 Aug 2023 02:28:02 +0000 (19:28 -0700)]
Merge tag 'rust-fixes-6.5-rc5' of https://github.com/Rust-for-Linux/linux

Pull rust fixes from Miguel Ojeda:

 - Allocator: prevent mis-aligned allocation

 - Types: delete 'ForeignOwnable::borrow_mut'. A sound replacement is
   planned for the merge window

 - Build: fix bindgen error with UBSAN_BOUNDS_STRICT

* tag 'rust-fixes-6.5-rc5' of https://github.com/Rust-for-Linux/linux:
  rust: fix bindgen build error with UBSAN_BOUNDS_STRICT
  rust: delete `ForeignOwnable::borrow_mut`
  rust: allocator: Prevent mis-aligned allocation

11 months agoMerge tag 'ata-6.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal...
Linus Torvalds [Sun, 6 Aug 2023 01:45:18 +0000 (18:45 -0700)]
Merge tag 'ata-6.5-rc5' of git://git./linux/kernel/git/dlemoal/libata

Pull ata fix from Damien Le Moal:

 - Prevent the scsi disk driver from issuing a START STOP UNIT command
   for ATA devices during system resume as this causes various issues
   reported by multiple users.

* tag 'ata-6.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata:
  ata,scsi: do not issue START STOP UNIT on resume

11 months agoMerge tag '6.5-rc4-smb3-client-fix' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Sat, 5 Aug 2023 20:44:06 +0000 (13:44 -0700)]
Merge tag '6.5-rc4-smb3-client-fix' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fix from Steve French:

 - Fix DFS interlink problem (different namespace)

* tag '6.5-rc4-smb3-client-fix' of git://git.samba.org/sfrench/cifs-2.6:
  smb: client: fix dfs link mount against w2k8

11 months agoMerge tag 'powerpc-6.5-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
Linus Torvalds [Sat, 5 Aug 2023 20:16:17 +0000 (13:16 -0700)]
Merge tag 'powerpc-6.5-5' of git://git./linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:

 - Fix vmemmap altmap boundary check which could cause memory hotunplug
   failure

 - Create a dummy stackframe to fix ftrace stack unwind

 - Fix secondary thread bringup for Book3E ELFv2 kernels

 - Use early_ioremap/unmap() in via_calibrate_decr()

Thanks to Aneesh Kumar K.V, Benjamin Gray, Christophe Leroy, David
Hildenbrand, and Naveen N Rao.

* tag 'powerpc-6.5-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/powermac: Use early_* IO variants in via_calibrate_decr()
  powerpc/64e: Fix secondary thread bringup for ELFv2 kernels
  powerpc/ftrace: Create a dummy stackframe to fix stack unwind
  powerpc/mm/altmap: Fix altmap boundary check

11 months agoMerge tag 'parisc-for-6.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/delle...
Linus Torvalds [Sat, 5 Aug 2023 20:09:05 +0000 (13:09 -0700)]
Merge tag 'parisc-for-6.5-rc5' of git://git./linux/kernel/git/deller/parisc-linux

Pull parisc architecture fixes from Helge Deller:

 - early fixmap preallocation to fix boot failures on kernel >= 6.4

 - remove DMA leftover code in parport_gsc

 - drop old comments and code style fixes

* tag 'parisc-for-6.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: unaligned: Add required spaces after ','
  parport: gsc: remove DMA leftover code
  parisc: pci-dma: remove unused and dead EISA code and comment
  parisc/mm: preallocate fixmap page tables at init

11 months agoMerge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 5 Aug 2023 02:35:09 +0000 (19:35 -0700)]
Merge tag 'clk-fixes-for-linus' of git://git./linux/kernel/git/clk/linux

Pull clk fixes from Stephen Boyd:
 "A few clk driver fixes for some SoC clk drivers:

   - Change a usleep() to udelay() to avoid scheduling while atomic in
     the Amlogic PLL code

   - Revert a patch to the Mediatek MT8183 driver that caused an
     out-of-bounds write

   - Return the right error value when devm_of_iomap() fails in
     imx93_clocks_probe()

   - Constrain the Kconfig for the fixed mmio clk so that it depends on
     HAS_IOMEM and can't be compiled on architectures such as s390"

* tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
  clk: fixed-mmio: make COMMON_CLK_FIXED_MMIO depend on HAS_IOMEM
  clk: imx93: Propagate correct error in imx93_clocks_probe()
  clk: mediatek: mt8183: Add back SSPM related clocks
  clk: meson: change usleep_range() to udelay() for atomic context

11 months agoMerge tag 'hyperv-fixes-signed-20230804' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 5 Aug 2023 00:16:14 +0000 (17:16 -0700)]
Merge tag 'hyperv-fixes-signed-20230804' of git://git./linux/kernel/git/hyperv/linux

Pull hyperv fixes from Wei Liu:

 - Fix a bug in a python script for Hyper-V (Ani Sinha)

 - Workaround a bug in Hyper-V when IBT is enabled (Michael Kelley)

 - Fix an issue parsing MP table when Linux runs in VTL2 (Saurabh
   Sengar)

 - Several cleanup patches (Nischala Yelchuri, Kameron Carr, YueHaibing,
   ZhiHu)

* tag 'hyperv-fixes-signed-20230804' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux:
  Drivers: hv: vmbus: Remove unused extern declaration vmbus_ontimer()
  x86/hyperv: add noop functions to x86_init mpparse functions
  vmbus_testing: fix wrong python syntax for integer value comparison
  x86/hyperv: fix a warning in mshyperv.h
  x86/hyperv: Disable IBT when hypercall page lacks ENDBR instruction
  x86/hyperv: Improve code for referencing hyperv_pcpu_input_arg
  Drivers: hv: Change hv_free_hyperv_page() to take void * argument

11 months agoMerge tag 'riscv-for-linus-6.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 4 Aug 2023 23:04:37 +0000 (16:04 -0700)]
Merge tag 'riscv-for-linus-6.5-rc5' of git://git./linux/kernel/git/riscv/linux

Pull RISC-V fixes from Palmer Dabbelt:

 - A pair of fixes for build-related failures in the selftests

 - A fix for a sparse warning in acpi_os_ioremap()

 - A fix to restore the kernel PA offset in vmcoreinfo, to fix crash
   handling

* tag 'riscv-for-linus-6.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  Documentation: kdump: Add va_kernel_pa_offset for RISCV64
  riscv: Export va_kernel_pa_offset in vmcoreinfo
  RISC-V: ACPI: Fix acpi_os_ioremap to return iomem address
  selftests: riscv: Fix compilation error with vstate_exec_nolibc.c
  selftests/riscv: fix potential build failure during the "emit_tests" step

11 months agoMerge tag 'pm-6.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Linus Torvalds [Fri, 4 Aug 2023 22:54:03 +0000 (15:54 -0700)]
Merge tag 'pm-6.5-rc5' of git://git./linux/kernel/git/rafael/linux-pm

Pull power management fix from Rafael Wysocki:
 "Fix a sparse warning triggered by the TPMI interface recently added to
  the Intel RAPL power capping driver (Zhang Rui)"

* tag 'pm-6.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  powercap: intel_rapl: Fix a sparse warning in TPMI interface