Hello,
this patch series removes all platform remove functions that only return
zero below drivers/soc. There is no reason to have these, as the only
caller is platform core code doing:
if (drv->remove) {
int ret = drv->remove(dev);
if (ret)
dev_warn(...)
}
(in platform_remove()) and so having no remove function is both
equivalent and simpler.
Best regards
Uwe
Uwe Kleine-König (3):
soc: bcm: bcm2835-power: Drop empty platform remove function
soc: mediatek: mutex: Drop empty platform remove function
soc: tegra: cbb: Drop empty platform remove function
drivers/soc/bcm/bcm2835-power.c | 6 ------
drivers/soc/mediatek/mtk-mutex.c | 6 ------
drivers/soc/tegra/cbb/tegra234-cbb.c | 6 ------
3 files changed, 18 deletions(-)
base-commit: 830b3c68c1fb1e9176028d02ef86f3cf76aa2476
--
2.38.1
A remove callback just returning 0 is equivalent to no remove callback
at all. So drop the useless function.
Signed-off-by: Uwe Kleine-König <[email protected]>
---
drivers/soc/tegra/cbb/tegra234-cbb.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/soc/tegra/cbb/tegra234-cbb.c b/drivers/soc/tegra/cbb/tegra234-cbb.c
index 3528f9e15d5c..3b26dcf9a70c 100644
--- a/drivers/soc/tegra/cbb/tegra234-cbb.c
+++ b/drivers/soc/tegra/cbb/tegra234-cbb.c
@@ -1066,11 +1066,6 @@ static int tegra234_cbb_probe(struct platform_device *pdev)
return tegra_cbb_register(&cbb->base);
}
-static int tegra234_cbb_remove(struct platform_device *pdev)
-{
- return 0;
-}
-
static int __maybe_unused tegra234_cbb_resume_noirq(struct device *dev)
{
struct tegra234_cbb *cbb = dev_get_drvdata(dev);
@@ -1088,7 +1083,6 @@ static const struct dev_pm_ops tegra234_cbb_pm = {
static struct platform_driver tegra234_cbb_driver = {
.probe = tegra234_cbb_probe,
- .remove = tegra234_cbb_remove,
.driver = {
.name = "tegra234-cbb",
.of_match_table = tegra234_cbb_dt_ids,
--
2.38.1
Hello,
On Mon, Dec 12, 2022 at 11:25:49PM +0100, Uwe Kleine-K?nig wrote:
> A remove callback just returning 0 is equivalent to no remove callback
> at all. So drop the useless function.
the other two patches in this series were applied individually to their
matching trees. For this one I didn't get feedback yet.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | https://www.pengutronix.de/ |
Hello,
[adding Sumit Gupta to Cc who authored all commits to this driver so
far, context available at
https://lore.kernel.org/r/[email protected]]
On Thu, Jan 12, 2023 at 10:55:11PM +0100, Uwe Kleine-K?nig wrote:
> On Mon, Dec 12, 2022 at 11:25:49PM +0100, Uwe Kleine-K?nig wrote:
> > A remove callback just returning 0 is equivalent to no remove callback
> > at all. So drop the useless function.
>
> the other two patches in this series were applied individually to their
> matching trees. For this one I didn't get feedback yet.
Did this patch fell through the cracks? Is it just -ENOMAINTAINERTIME?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | https://www.pengutronix.de/ |
On 13/12/22 03:55, Uwe Kleine-König wrote:
> External email: Use caution opening links or attachments
>
>
> A remove callback just returning 0 is equivalent to no remove callback
> at all. So drop the useless function.
>
> Signed-off-by: Uwe Kleine-König <[email protected]>
Reviewed-by: Sumit Gupta <[email protected]>
> ---
> drivers/soc/tegra/cbb/tegra234-cbb.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/soc/tegra/cbb/tegra234-cbb.c b/drivers/soc/tegra/cbb/tegra234-cbb.c
> index 3528f9e15d5c..3b26dcf9a70c 100644
> --- a/drivers/soc/tegra/cbb/tegra234-cbb.c
> +++ b/drivers/soc/tegra/cbb/tegra234-cbb.c
> @@ -1066,11 +1066,6 @@ static int tegra234_cbb_probe(struct platform_device *pdev)
> return tegra_cbb_register(&cbb->base);
> }
>
> -static int tegra234_cbb_remove(struct platform_device *pdev)
> -{
> - return 0;
> -}
> -
> static int __maybe_unused tegra234_cbb_resume_noirq(struct device *dev)
> {
> struct tegra234_cbb *cbb = dev_get_drvdata(dev);
> @@ -1088,7 +1083,6 @@ static const struct dev_pm_ops tegra234_cbb_pm = {
>
> static struct platform_driver tegra234_cbb_driver = {
> .probe = tegra234_cbb_probe,
> - .remove = tegra234_cbb_remove,
> .driver = {
> .name = "tegra234-cbb",
> .of_match_table = tegra234_cbb_dt_ids,
> --
> 2.38.1
>
From: Thierry Reding <[email protected]>
On Mon, 12 Dec 2022 23:25:49 +0100, Uwe Kleine-König wrote:
> A remove callback just returning 0 is equivalent to no remove callback
> at all. So drop the useless function.
>
>
Applied, thanks!
[3/3] soc: tegra: cbb: Drop empty platform remove function
commit: c299a2e6bf944b4218acc194a1cdf500b34e80aa
Best regards,
--
Thierry Reding <[email protected]>