mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] soc: Drop empty platform remove function
@ 2022-12-12 22:25 Uwe Kleine-König
  2022-12-12 22:25 ` [PATCH 1/3] soc: bcm: bcm2835-power: " Uwe Kleine-König
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Uwe Kleine-König @ 2022-12-12 22:25 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Thierry Reding,
	Jonathan Hunter
  Cc: Broadcom internal kernel review list, linux-rpi-kernel,
	linux-arm-kernel, linux-kernel, kernel, Matthias Brugger,
	linux-mediatek, linux-tegra

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/3] soc: bcm: bcm2835-power: Drop empty platform remove function
  2022-12-12 22:25 [PATCH 0/3] soc: Drop empty platform remove function Uwe Kleine-König
@ 2022-12-12 22:25 ` Uwe Kleine-König
  2022-12-12 22:56   ` Florian Fainelli
  2022-12-12 22:25 ` [PATCH 2/3] soc: mediatek: mutex: " Uwe Kleine-König
  2022-12-12 22:25 ` [PATCH 3/3] soc: tegra: cbb: " Uwe Kleine-König
  2 siblings, 1 reply; 11+ messages in thread
From: Uwe Kleine-König @ 2022-12-12 22:25 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden
  Cc: Broadcom internal kernel review list, linux-rpi-kernel,
	linux-arm-kernel, linux-kernel, kernel

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 <u.kleine-koenig@pengutronix.de>
---
 drivers/soc/bcm/bcm2835-power.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/soc/bcm/bcm2835-power.c b/drivers/soc/bcm/bcm2835-power.c
index 5bcd047768b6..bf51f03f77d6 100644
--- a/drivers/soc/bcm/bcm2835-power.c
+++ b/drivers/soc/bcm/bcm2835-power.c
@@ -701,14 +701,8 @@ static int bcm2835_power_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int bcm2835_power_remove(struct platform_device *pdev)
-{
-	return 0;
-}
-
 static struct platform_driver bcm2835_power_driver = {
 	.probe		= bcm2835_power_probe,
-	.remove		= bcm2835_power_remove,
 	.driver = {
 		.name =	"bcm2835-power",
 	},
-- 
2.38.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 2/3] soc: mediatek: mutex: Drop empty platform remove function
  2022-12-12 22:25 [PATCH 0/3] soc: Drop empty platform remove function Uwe Kleine-König
  2022-12-12 22:25 ` [PATCH 1/3] soc: bcm: bcm2835-power: " Uwe Kleine-König
@ 2022-12-12 22:25 ` Uwe Kleine-König
  2022-12-13  9:50   ` AngeloGioacchino Del Regno
  2022-12-12 22:25 ` [PATCH 3/3] soc: tegra: cbb: " Uwe Kleine-König
  2 siblings, 1 reply; 11+ messages in thread
From: Uwe Kleine-König @ 2022-12-12 22:25 UTC (permalink / raw)
  Cc: Matthias Brugger, linux-arm-kernel, linux-mediatek, linux-kernel, kernel

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 <u.kleine-koenig@pengutronix.de>
---
 drivers/soc/mediatek/mtk-mutex.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/soc/mediatek/mtk-mutex.c b/drivers/soc/mediatek/mtk-mutex.c
index c1a33d52038e..85f7fd67d7c6 100644
--- a/drivers/soc/mediatek/mtk-mutex.c
+++ b/drivers/soc/mediatek/mtk-mutex.c
@@ -832,11 +832,6 @@ static int mtk_mutex_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int mtk_mutex_remove(struct platform_device *pdev)
-{
-	return 0;
-}
-
 static const struct of_device_id mutex_driver_dt_match[] = {
 	{ .compatible = "mediatek,mt2701-disp-mutex",
 	  .data = &mt2701_mutex_driver_data},
@@ -866,7 +861,6 @@ MODULE_DEVICE_TABLE(of, mutex_driver_dt_match);
 
 static struct platform_driver mtk_mutex_driver = {
 	.probe		= mtk_mutex_probe,
-	.remove		= mtk_mutex_remove,
 	.driver		= {
 		.name	= "mediatek-mutex",
 		.owner	= THIS_MODULE,
-- 
2.38.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 3/3] soc: tegra: cbb: Drop empty platform remove function
  2022-12-12 22:25 [PATCH 0/3] soc: Drop empty platform remove function Uwe Kleine-König
  2022-12-12 22:25 ` [PATCH 1/3] soc: bcm: bcm2835-power: " Uwe Kleine-König
  2022-12-12 22:25 ` [PATCH 2/3] soc: mediatek: mutex: " Uwe Kleine-König
@ 2022-12-12 22:25 ` Uwe Kleine-König
  2023-01-12 21:55   ` Uwe Kleine-König
                     ` (2 more replies)
  2 siblings, 3 replies; 11+ messages in thread
From: Uwe Kleine-König @ 2022-12-12 22:25 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter; +Cc: linux-tegra, linux-kernel, kernel

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 <u.kleine-koenig@pengutronix.de>
---
 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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/3] soc: bcm: bcm2835-power: Drop empty platform remove function
  2022-12-12 22:25 ` [PATCH 1/3] soc: bcm: bcm2835-power: " Uwe Kleine-König
@ 2022-12-12 22:56   ` Florian Fainelli
  0 siblings, 0 replies; 11+ messages in thread
From: Florian Fainelli @ 2022-12-12 22:56 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Uwe Kleine-König, Ray Jui, Scott Branden
  Cc: linux-rpi-kernel, linux-arm-kernel, linux-kernel, kernel

On Mon, 12 Dec 2022 23:25:47 +0100, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> 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 <u.kleine-koenig@pengutronix.de>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/drivers/next, thanks!
--
Florian

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] soc: mediatek: mutex: Drop empty platform remove function
  2022-12-12 22:25 ` [PATCH 2/3] soc: mediatek: mutex: " Uwe Kleine-König
@ 2022-12-13  9:50   ` AngeloGioacchino Del Regno
  2022-12-16 12:27     ` Matthias Brugger
  0 siblings, 1 reply; 11+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-12-13  9:50 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Matthias Brugger, linux-arm-kernel, linux-mediatek, linux-kernel, kernel

Il 12/12/22 23:25, Uwe Kleine-König ha scritto:
> 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 <u.kleine-koenig@pengutronix.de>

Totally agree.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] soc: mediatek: mutex: Drop empty platform remove function
  2022-12-13  9:50   ` AngeloGioacchino Del Regno
@ 2022-12-16 12:27     ` Matthias Brugger
  0 siblings, 0 replies; 11+ messages in thread
From: Matthias Brugger @ 2022-12-16 12:27 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, Uwe Kleine-König
  Cc: linux-arm-kernel, linux-mediatek, linux-kernel, kernel



On 13/12/2022 10:50, AngeloGioacchino Del Regno wrote:
> Il 12/12/22 23:25, Uwe Kleine-König ha scritto:
>> 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 <u.kleine-koenig@pengutronix.de>
> 
> Totally agree.
> 
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> 

Applied thanks

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] soc: tegra: cbb: Drop empty platform remove function
  2022-12-12 22:25 ` [PATCH 3/3] soc: tegra: cbb: " Uwe Kleine-König
@ 2023-01-12 21:55   ` Uwe Kleine-König
  2023-02-15  7:47     ` Uwe Kleine-König
  2023-02-15  9:47   ` Sumit Gupta
  2023-04-05 12:41   ` (subset) " Thierry Reding
  2 siblings, 1 reply; 11+ messages in thread
From: Uwe Kleine-König @ 2023-01-12 21:55 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter; +Cc: linux-tegra, linux-kernel, kernel

[-- Attachment #1: Type: text/plain, Size: 504 bytes --]

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/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] soc: tegra: cbb: Drop empty platform remove function
  2023-01-12 21:55   ` Uwe Kleine-König
@ 2023-02-15  7:47     ` Uwe Kleine-König
  0 siblings, 0 replies; 11+ messages in thread
From: Uwe Kleine-König @ 2023-02-15  7:47 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter
  Cc: linux-tegra, linux-kernel, kernel, Sumit Gupta

[-- Attachment #1: Type: text/plain, Size: 840 bytes --]

Hello,

[adding Sumit Gupta to Cc who authored all commits to this driver so
far, context available at
https://lore.kernel.org/r/20221212222549.3779846-4-u.kleine-koenig@pengutronix.de]

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/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] soc: tegra: cbb: Drop empty platform remove function
  2022-12-12 22:25 ` [PATCH 3/3] soc: tegra: cbb: " Uwe Kleine-König
  2023-01-12 21:55   ` Uwe Kleine-König
@ 2023-02-15  9:47   ` Sumit Gupta
  2023-04-05 12:41   ` (subset) " Thierry Reding
  2 siblings, 0 replies; 11+ messages in thread
From: Sumit Gupta @ 2023-02-15  9:47 UTC (permalink / raw)
  To: Uwe Kleine-König, Thierry Reding, Jonathan Hunter
  Cc: linux-tegra, linux-kernel, kernel, Sumit Gupta



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 <u.kleine-koenig@pengutronix.de>

Reviewed-by: Sumit Gupta <sumitg@nvidia.com>

> ---
>   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
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: (subset) [PATCH 3/3] soc: tegra: cbb: Drop empty platform remove function
  2022-12-12 22:25 ` [PATCH 3/3] soc: tegra: cbb: " Uwe Kleine-König
  2023-01-12 21:55   ` Uwe Kleine-König
  2023-02-15  9:47   ` Sumit Gupta
@ 2023-04-05 12:41   ` Thierry Reding
  2 siblings, 0 replies; 11+ messages in thread
From: Thierry Reding @ 2023-04-05 12:41 UTC (permalink / raw)
  To: Thierry Reding, Uwe Kleine-König, Jonathan Hunter
  Cc: kernel, linux-tegra, linux-kernel

From: Thierry Reding <treding@nvidia.com>

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 <treding@nvidia.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-04-05 12:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-12 22:25 [PATCH 0/3] soc: Drop empty platform remove function Uwe Kleine-König
2022-12-12 22:25 ` [PATCH 1/3] soc: bcm: bcm2835-power: " Uwe Kleine-König
2022-12-12 22:56   ` Florian Fainelli
2022-12-12 22:25 ` [PATCH 2/3] soc: mediatek: mutex: " Uwe Kleine-König
2022-12-13  9:50   ` AngeloGioacchino Del Regno
2022-12-16 12:27     ` Matthias Brugger
2022-12-12 22:25 ` [PATCH 3/3] soc: tegra: cbb: " Uwe Kleine-König
2023-01-12 21:55   ` Uwe Kleine-König
2023-02-15  7:47     ` Uwe Kleine-König
2023-02-15  9:47   ` Sumit Gupta
2023-04-05 12:41   ` (subset) " Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®