2023-09-25 11:13:14

by Uwe Kleine-König

[permalink] [raw]
Subject: [PATCH 00/40] soc: Convert to platform remove callback returning void

Hello,

this series converts all platform drivers below drivers/soc to use
.remove_new(). The motivation is to get rid of an integer return code
that is (mostly) ignored by the platform driver core and error prone on
the driver side.

See commit 5c5a7680e67b ("platform: Provide a remove callback that
returns no value") for an extended explanation and the eventual goal.

As there is no single maintainer team for drivers/soc, I suggest the
individual maintainers to pick up "their" patches. There are no
interdependencies between the patches, so that should work fine. As
there are still quite a few drivers to convert in other areas than
drivers/soc, I'm happy about every patch that makes it in and there is
no need for further coordination. So even if there is a merge conflict
with one patch until you apply or a subject prefix is suboptimal, please
don't let you stop by negative feedback for other patches (unless it
applies to "your" patches, too, of course).

Best regards and thanks for considering,
Uwe

Uwe Kleine-König (40):
soc/aspeed: aspeed-lpc-ctrl: Convert to platform remove callback
returning void
soc/aspeed: aspeed-lpc-snoop: Convert to platform remove callback
returning void
soc/aspeed: aspeed-p2a-ctrl: Convert to platform remove callback
returning void
soc/aspeed: aspeed-uart-routing: Convert to platform remove callback
returning void
soc/fsl: dpaa2-console: Convert to platform remove callback returning
void
soc/fsl: cpm: qmc: Convert to platform remove callback returning void
soc/fsl: cpm: tsa: Convert to platform remove callback returning void
soc/fujitsu: a64fx-diag: Convert to platform remove callback returning
void
soc/hisilicon: kunpeng_hccs: Convert to platform remove callback
returning void
soc/ixp4xx: ixp4xx-npe: Convert to platform remove callback returning
void
soc/ixp4xx: ixp4xx-qmgr: Convert to platform remove callback returning
void
soc/litex: litex_soc_ctrl: Convert to platform remove callback
returning void
soc/loongson: loongson2_guts: Convert to platform remove callback
returning void
soc/mediatek: mtk-devapc: Convert to platform remove callback
returning void
soc/mediatek: mtk-mmsys: Convert to platform remove callback returning
void
soc/microchip: mpfs-sys-controller: Convert to platform remove
callback returning void
soc/pxa: ssp: Convert to platform remove callback returning void
soc/qcom: icc-bwmon: Convert to platform remove callback returning
void
soc/qcom: llcc-qcom: Convert to platform remove callback returning
void
soc/qcom: ocmem: Convert to platform remove callback returning void
soc/qcom: pmic_glink: Convert to platform remove callback returning
void
soc/qcom: qcom_aoss: Convert to platform remove callback returning
void
soc/qcom: qcom_gsbi: Convert to platform remove callback returning
void
soc/qcom: qcom_stats: Convert to platform remove callback returning
void
soc/qcom: rmtfs_mem: Convert to platform remove callback returning
void
soc/qcom: smem: Convert to platform remove callback returning void
soc/qcom: smp2p: Convert to platform remove callback returning void
soc/qcom: smsm: Convert to platform remove callback returning void
soc/qcom: socinfo: Convert to platform remove callback returning void
soc/rockchip: io-domain: Convert to platform remove callback returning
void
soc/samsung: exynos-chipid: Convert to platform remove callback
returning void
soc/tegra: cbb: tegra194-cbb: Convert to platform remove callback
returning void
soc/ti: k3-ringacc: Convert to platform remove callback returning void
soc/ti: knav_dma: Convert to platform remove callback returning void
soc/ti: knav_qmss_queue: Convert to platform remove callback returning
void
soc/ti: pm33xx: Convert to platform remove callback returning void
soc/ti: pruss: Convert to platform remove callback returning void
soc/ti: smartreflex: Convert to platform remove callback returning
void
soc/ti: wkup_m3_ipc: Convert to platform remove callback returning
void
soc/xilinx: zynqmp_power: Convert to platform remove callback
returning void

drivers/soc/aspeed/aspeed-lpc-ctrl.c | 6 ++----
drivers/soc/aspeed/aspeed-lpc-snoop.c | 6 ++----
drivers/soc/aspeed/aspeed-p2a-ctrl.c | 6 ++----
drivers/soc/aspeed/aspeed-uart-routing.c | 6 ++----
drivers/soc/fsl/dpaa2-console.c | 6 ++----
drivers/soc/fsl/qe/qmc.c | 6 ++----
drivers/soc/fsl/qe/tsa.c | 5 ++---
drivers/soc/fujitsu/a64fx-diag.c | 6 ++----
drivers/soc/hisilicon/kunpeng_hccs.c | 6 ++----
drivers/soc/ixp4xx/ixp4xx-npe.c | 6 ++----
drivers/soc/ixp4xx/ixp4xx-qmgr.c | 5 ++---
drivers/soc/litex/litex_soc_ctrl.c | 5 ++---
drivers/soc/loongson/loongson2_guts.c | 6 ++----
drivers/soc/mediatek/mtk-devapc.c | 6 ++----
drivers/soc/mediatek/mtk-mmsys.c | 6 ++----
drivers/soc/microchip/mpfs-sys-controller.c | 6 ++----
drivers/soc/pxa/ssp.c | 6 ++----
drivers/soc/qcom/icc-bwmon.c | 6 ++----
drivers/soc/qcom/llcc-qcom.c | 5 ++---
drivers/soc/qcom/ocmem.c | 6 ++----
drivers/soc/qcom/pmic_glink.c | 6 ++----
drivers/soc/qcom/qcom_aoss.c | 6 ++----
drivers/soc/qcom/qcom_gsbi.c | 6 ++----
drivers/soc/qcom/qcom_stats.c | 6 ++----
drivers/soc/qcom/rmtfs_mem.c | 6 ++----
drivers/soc/qcom/smem.c | 6 ++----
drivers/soc/qcom/smp2p.c | 6 ++----
drivers/soc/qcom/smsm.c | 6 ++----
drivers/soc/qcom/socinfo.c | 6 ++----
drivers/soc/rockchip/io-domain.c | 6 ++----
drivers/soc/samsung/exynos-chipid.c | 6 ++----
drivers/soc/tegra/cbb/tegra194-cbb.c | 6 ++----
drivers/soc/ti/k3-ringacc.c | 5 ++---
drivers/soc/ti/knav_dma.c | 6 ++----
drivers/soc/ti/knav_qmss_queue.c | 5 ++---
drivers/soc/ti/pm33xx.c | 5 ++---
drivers/soc/ti/pruss.c | 6 ++----
drivers/soc/ti/smartreflex.c | 5 ++---
drivers/soc/ti/wkup_m3_ipc.c | 6 ++----
drivers/soc/xilinx/zynqmp_power.c | 6 ++----
40 files changed, 80 insertions(+), 152 deletions(-)

base-commit: 8fff9184d1b5810dca5dd1a02726d4f844af88fc
--
2.40.1


2023-09-25 11:13:17

by Uwe Kleine-König

[permalink] [raw]
Subject: [PATCH 28/40] soc/qcom: smsm: 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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

Signed-off-by: Uwe Kleine-König <[email protected]>
---
drivers/soc/qcom/smsm.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/qcom/smsm.c b/drivers/soc/qcom/smsm.c
index c58cfff64856..e7c7e9a640a6 100644
--- a/drivers/soc/qcom/smsm.c
+++ b/drivers/soc/qcom/smsm.c
@@ -613,7 +613,7 @@ static int qcom_smsm_probe(struct platform_device *pdev)
return ret;
}

-static int qcom_smsm_remove(struct platform_device *pdev)
+static void qcom_smsm_remove(struct platform_device *pdev)
{
struct qcom_smsm *smsm = platform_get_drvdata(pdev);
unsigned id;
@@ -623,8 +623,6 @@ static int qcom_smsm_remove(struct platform_device *pdev)
irq_domain_remove(smsm->entries[id].domain);

qcom_smem_state_unregister(smsm->state);
-
- return 0;
}

static const struct of_device_id qcom_smsm_of_match[] = {
@@ -635,7 +633,7 @@ MODULE_DEVICE_TABLE(of, qcom_smsm_of_match);

static struct platform_driver qcom_smsm_driver = {
.probe = qcom_smsm_probe,
- .remove = qcom_smsm_remove,
+ .remove_new = qcom_smsm_remove,
.driver = {
.name = "qcom-smsm",
.of_match_table = qcom_smsm_of_match,
--
2.40.1

2023-09-25 11:13:19

by Uwe Kleine-König

[permalink] [raw]
Subject: [PATCH 40/40] soc/xilinx: zynqmp_power: 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

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

Signed-off-by: Uwe Kleine-König <[email protected]>
---
drivers/soc/xilinx/zynqmp_power.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/xilinx/zynqmp_power.c b/drivers/soc/xilinx/zynqmp_power.c
index c2c819701eec..9d27f850f491 100644
--- a/drivers/soc/xilinx/zynqmp_power.c
+++ b/drivers/soc/xilinx/zynqmp_power.c
@@ -275,7 +275,7 @@ static int zynqmp_pm_probe(struct platform_device *pdev)
return 0;
}

-static int zynqmp_pm_remove(struct platform_device *pdev)
+static void zynqmp_pm_remove(struct platform_device *pdev)
{
sysfs_remove_file(&pdev->dev.kobj, &dev_attr_suspend_mode.attr);
if (event_registered)
@@ -283,8 +283,6 @@ static int zynqmp_pm_remove(struct platform_device *pdev)

if (!rx_chan)
mbox_free_channel(rx_chan);
-
- return 0;
}

static const struct of_device_id pm_of_match[] = {
@@ -295,7 +293,7 @@ MODULE_DEVICE_TABLE(of, pm_of_match);

static struct platform_driver zynqmp_pm_platform_driver = {
.probe = zynqmp_pm_probe,
- .remove = zynqmp_pm_remove,
+ .remove_new = zynqmp_pm_remove,
.driver = {
.name = "zynqmp_power",
.of_match_table = pm_of_match,
--
2.40.1

2023-09-25 11:28:59

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 00/40] soc: Convert to platform remove callback returning void

On 25.09.2023 11:54, Uwe Kleine-König wrote:
> Hello,
>
> this series converts all platform drivers below drivers/soc to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.
>
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.
>
Acked-by: Konrad Dybcio <[email protected]> # qcom

Konrad

2023-09-27 11:55:10

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 00/40] soc: Convert to platform remove callback returning void

On Wed, Sep 27, 2023, at 04:25, Joel Stanley wrote:
> On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-König <[email protected]> wrote:
>>
>> this series converts all platform drivers below drivers/soc to use
>> .remove_new(). The motivation is to get rid of an integer return code
>> that is (mostly) ignored by the platform driver core and error prone on
>> the driver side.
>>
>> See commit 5c5a7680e67b ("platform: Provide a remove callback that
>> returns no value") for an extended explanation and the eventual goal.
>>
>> As there is no single maintainer team for drivers/soc, I suggest the
>> individual maintainers to pick up "their" patches.
>
> I'd be happy if Arnd merged the lot at once. Arnd, what do you think?
>
> If that will be too messy then I understand. I have queued the aspeed
> ones locally and will push that out if we decide that's the best way
> to go.

The main downside of merging it all at once through the soc tree
is that there may be patches that conflict with other work going on
in individual drivers.

What I'd suggest doing here is:

- have platform maintainers pick up patches for their drivers
if that is their preference for any reason

- get a pull request from Uwe for the soc tree for anything that has
not been picked up in one or two weeks from now

Arnd

2023-09-27 12:58:47

by Joel Stanley

[permalink] [raw]
Subject: Re: [PATCH 00/40] soc: Convert to platform remove callback returning void

On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-König
<[email protected]> wrote:
>
> Hello,
>
> this series converts all platform drivers below drivers/soc to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.
>
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.
>
> As there is no single maintainer team for drivers/soc, I suggest the
> individual maintainers to pick up "their" patches.

I'd be happy if Arnd merged the lot at once. Arnd, what do you think?

If that will be too messy then I understand. I have queued the aspeed
ones locally and will push that out if we decide that's the best way
to go.

Thanks for doing this cleanup Uwe.

Cheers,

Joel

2023-09-27 23:06:56

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH 00/40] soc: Convert to platform remove callback returning void

On Wed, Sep 27, 2023 at 10:43:16AM +0200, Arnd Bergmann wrote:
> On Wed, Sep 27, 2023, at 04:25, Joel Stanley wrote:
> > On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-K?nig <[email protected]> wrote:
> >>
> >> this series converts all platform drivers below drivers/soc to use
> >> .remove_new(). The motivation is to get rid of an integer return code
> >> that is (mostly) ignored by the platform driver core and error prone on
> >> the driver side.
> >>
> >> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> >> returns no value") for an extended explanation and the eventual goal.
> >>
> >> As there is no single maintainer team for drivers/soc, I suggest the
> >> individual maintainers to pick up "their" patches.
> >
> > I'd be happy if Arnd merged the lot at once. Arnd, what do you think?
> >
> > If that will be too messy then I understand. I have queued the aspeed
> > ones locally and will push that out if we decide that's the best way
> > to go.
>
> The main downside of merging it all at once through the soc tree
> is that there may be patches that conflict with other work going on
> in individual drivers.
>
> What I'd suggest doing here is:
>
> - have platform maintainers pick up patches for their drivers
> if that is their preference for any reason
>

I'd prefer this for the qcom drivers at least, please let me know if you
would like me to proceed.

Regards,
Bjorn

> - get a pull request from Uwe for the soc tree for anything that has
> not been picked up in one or two weeks from now
>
> Arnd

2023-09-28 06:26:15

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [PATCH 00/40] soc: Convert to platform remove callback returning void

On Wed, Sep 27, 2023 at 04:01:58PM -0700, Bjorn Andersson wrote:
> On Wed, Sep 27, 2023 at 10:43:16AM +0200, Arnd Bergmann wrote:
> > On Wed, Sep 27, 2023, at 04:25, Joel Stanley wrote:
> > > On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-K?nig <[email protected]> wrote:
> > >>
> > >> this series converts all platform drivers below drivers/soc to use
> > >> .remove_new(). The motivation is to get rid of an integer return code
> > >> that is (mostly) ignored by the platform driver core and error prone on
> > >> the driver side.
> > >>
> > >> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> > >> returns no value") for an extended explanation and the eventual goal.
> > >>
> > >> As there is no single maintainer team for drivers/soc, I suggest the
> > >> individual maintainers to pick up "their" patches.
> > >
> > > I'd be happy if Arnd merged the lot at once. Arnd, what do you think?
> > >
> > > If that will be too messy then I understand. I have queued the aspeed
> > > ones locally and will push that out if we decide that's the best way
> > > to go.
> >
> > The main downside of merging it all at once through the soc tree
> > is that there may be patches that conflict with other work going on
> > in individual drivers.
> >
> > What I'd suggest doing here is:
> >
> > - have platform maintainers pick up patches for their drivers
> > if that is their preference for any reason
>
> I'd prefer this for the qcom drivers at least, please let me know if you
> would like me to proceed.

I can send a pull request as Arnd suggested. So iff you want the qcom
drivers not be a part of that PR, just make sure they appear in next
during the next week. :-)

(I'm not sure if "this" in your last quoted sentence is "platform
maintainers pick up" or "merging it all at once through the soc tree". I
think you mean the former. Still if you don't want me to pick up the
qcom patches and won't manage to make them appear in next via your tree,
I ask you to tell me explicitly to skip these in my PR.)

Best regards and thanks,
Uwe

--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | https://www.pengutronix.de/ |


Attachments:
(No filename) (2.22 kB)
signature.asc (499.00 B)
Download all attachments

2023-10-02 12:42:33

by Michal Simek

[permalink] [raw]
Subject: Re: [PATCH 40/40] soc/xilinx: zynqmp_power: Convert to platform remove callback returning void



On 9/25/23 11:55, Uwe Kleine-König wrote:
> 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
>
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
>
> Signed-off-by: Uwe Kleine-König <[email protected]>
> ---
> drivers/soc/xilinx/zynqmp_power.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/soc/xilinx/zynqmp_power.c b/drivers/soc/xilinx/zynqmp_power.c
> index c2c819701eec..9d27f850f491 100644
> --- a/drivers/soc/xilinx/zynqmp_power.c
> +++ b/drivers/soc/xilinx/zynqmp_power.c
> @@ -275,7 +275,7 @@ static int zynqmp_pm_probe(struct platform_device *pdev)
> return 0;
> }
>
> -static int zynqmp_pm_remove(struct platform_device *pdev)
> +static void zynqmp_pm_remove(struct platform_device *pdev)
> {
> sysfs_remove_file(&pdev->dev.kobj, &dev_attr_suspend_mode.attr);
> if (event_registered)
> @@ -283,8 +283,6 @@ static int zynqmp_pm_remove(struct platform_device *pdev)
>
> if (!rx_chan)
> mbox_free_channel(rx_chan);
> -
> - return 0;
> }
>
> static const struct of_device_id pm_of_match[] = {
> @@ -295,7 +293,7 @@ MODULE_DEVICE_TABLE(of, pm_of_match);
>
> static struct platform_driver zynqmp_pm_platform_driver = {
> .probe = zynqmp_pm_probe,
> - .remove = zynqmp_pm_remove,
> + .remove_new = zynqmp_pm_remove,
> .driver = {
> .name = "zynqmp_power",
> .of_match_table = pm_of_match,

Applied only this patch.
Thanks,
Michal

2023-10-02 22:30:56

by Nishanth Menon

[permalink] [raw]
Subject: Re: (subset) [PATCH 00/40] soc: Convert to platform remove callback returning void

Hi Uwe Kleine-König,

On Mon, 25 Sep 2023 11:54:51 +0200, Uwe Kleine-König wrote:
> this series converts all platform drivers below drivers/soc to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.
>
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.
>
> [...]

I have applied the following to branch ti-drivers-soc-next on [1].
Thank you!

[33/40] soc/ti: k3-ringacc: Convert to platform remove callback returning void
commit: f34b902c5ba67841902cd7f0e24e64bb82f69cb4
[34/40] soc/ti: knav_dma: Convert to platform remove callback returning void
commit: 3af4ec7c7dd39a2c4618f6536b2e7b73a19be169
[35/40] soc/ti: knav_qmss_queue: Convert to platform remove callback returning void
commit: af97160a0c5f1908c6f2830023fb93baac4451d3
[36/40] soc/ti: pm33xx: Convert to platform remove callback returning void
commit: 9eb950e9fffc5337bfe1798cf89ce4d97a4f1221
[37/40] soc/ti: pruss: Convert to platform remove callback returning void
commit: d183b20d340b7c098f44cb5c02f4ced01cfd0b16
[38/40] soc/ti: smartreflex: Convert to platform remove callback returning void
commit: ba03aab9bfb4c9d456419da3891375d45c6bfe15
[39/40] soc/ti: wkup_m3_ipc: Convert to platform remove callback returning void
commit: 82e83cb51c87b5bf3ab83f7c7b150c19400056c2

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D

2023-10-03 01:06:32

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH 00/40] soc: Convert to platform remove callback returning void


On Mon, 25 Sep 2023 11:54:51 +0200, Uwe Kleine-König wrote:
> this series converts all platform drivers below drivers/soc to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.
>
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.
>
> [...]

Applied, thanks!

[18/40] soc/qcom: icc-bwmon: Convert to platform remove callback returning void
commit: dd714c568ed4e6f79017be45077de71e9908af03
[19/40] soc/qcom: llcc-qcom: Convert to platform remove callback returning void
commit: d85a9d18a58156fc8b5ab185e00e078adaaeefde
[20/40] soc/qcom: ocmem: Convert to platform remove callback returning void
commit: 0b742c498bcd7d215501b10fe9df72a16237735a
[21/40] soc/qcom: pmic_glink: Convert to platform remove callback returning void
commit: 4b3373e42dc2caa34394ac090c8c70bed49badd6
[22/40] soc/qcom: qcom_aoss: Convert to platform remove callback returning void
commit: ffbe84a514f863a46a85c1e47b2b6d930b1b463e
[23/40] soc/qcom: qcom_gsbi: Convert to platform remove callback returning void
commit: 57b31729bd2c72b00d400106e18db91e9d95d3c3
[24/40] soc/qcom: qcom_stats: Convert to platform remove callback returning void
commit: a47ff90bf2f93ce4ca99858948a74a0c10a2bc45
[25/40] soc/qcom: rmtfs_mem: Convert to platform remove callback returning void
commit: 7c93da5b8b69d4e4e7270c33ba3206af43930e1d
[26/40] soc/qcom: smem: Convert to platform remove callback returning void
commit: 4b8dee9a34d51a61f60add996fae6a7140a20ae5
[27/40] soc/qcom: smp2p: Convert to platform remove callback returning void
commit: 1cd966c2dc19654ed08c843e5c933db8c1349636
[28/40] soc/qcom: smsm: Convert to platform remove callback returning void
commit: bdd7cc62cf69fe989557445d65d6c8cb2f956518
[29/40] soc/qcom: socinfo: Convert to platform remove callback returning void
commit: c0989f7d1264b2b1885345a28a32fd5e1e61f9c7

Best regards,
--
Bjorn Andersson <[email protected]>

2023-10-14 22:01:22

by Uwe Kleine-König

[permalink] [raw]
Subject: [GIT PULL] Convert drivers/soc to struct platform_driver::remove_new()

Hello Arnd,

the following changes since commit 0bb80ecc33a8fb5a682236443c1e740d5c917d1d:

Linux 6.6-rc1 (2023-09-10 16:28:41 -0700)

are available in the Git repository at:

https://git.pengutronix.de/git/ukl/linux tags/platform-remove-void-soc-for-6.7-rc

for you to fetch changes up to e77e6e3e909d33361c58af848a96e1f7f71ba7e4:

soc/pxa: ssp: Convert to platform remove callback returning void (2023-10-14 23:27:34 +0200)

----------------------------------------------------------------
Convert drivers/soc to struct platform_driver::remove_new()

This PR contains the patches I sent in the series available at
https://lore.kernel.org/all/[email protected]
that were not yet picked up in next as of next-20231013.

It converts all drivers below drivers/soc to let their remove callback
return void. See commit 5c5a7680e67b ("platform: Provide a remove
callback that returns no value") for the rationale.

----------------------------------------------------------------

On Thu, Sep 28, 2023 at 08:14:49AM +0200, Uwe Kleine-K?nig wrote:
> On Wed, Sep 27, 2023 at 04:01:58PM -0700, Bjorn Andersson wrote:
> > On Wed, Sep 27, 2023 at 10:43:16AM +0200, Arnd Bergmann wrote:
> > > On Wed, Sep 27, 2023, at 04:25, Joel Stanley wrote:
> > > > On Mon, 25 Sept 2023 at 09:55, Uwe Kleine-K?nig <[email protected]> wrote:
> > > >>
> > > >> this series converts all platform drivers below drivers/soc to use
> > > >> .remove_new(). The motivation is to get rid of an integer return code
> > > >> that is (mostly) ignored by the platform driver core and error prone on
> > > >> the driver side.
> > > >>
> > > >> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> > > >> returns no value") for an extended explanation and the eventual goal.
> > > >>
> > > >> As there is no single maintainer team for drivers/soc, I suggest the
> > > >> individual maintainers to pick up "their" patches.
> > > >
> > > > I'd be happy if Arnd merged the lot at once. Arnd, what do you think?
> > > >
> > > > If that will be too messy then I understand. I have queued the aspeed
> > > > ones locally and will push that out if we decide that's the best way
> > > > to go.
> > >
> > > The main downside of merging it all at once through the soc tree
> > > is that there may be patches that conflict with other work going on
> > > in individual drivers.
> > >
> > > What I'd suggest doing here is:
> > >
> > > - have platform maintainers pick up patches for their drivers
> > > if that is their preference for any reason
> >
> > I'd prefer this for the qcom drivers at least, please let me know if you
> > would like me to proceed.
>
> I can send a pull request as Arnd suggested. So iff you want the qcom
> drivers not be a part of that PR, just make sure they appear in next
> during the next week. :-)
>
> > > - get a pull request from Uwe for the soc tree for anything that has
> > > not been picked up in one or two weeks from now

Here comes the promised PR. The qcom patches are among the set of
patches dropped here as they are already in next.

To state the obvious: This is merge window material and the idea is that
it's pulled into armsoc and then included in the armsoc v6.7-rc1 PR to
Linus Torvalds. I hope it's not too late for that already.

Best regards and thanks
Uwe

Uwe Kleine-K?nig (12):
soc/fsl: dpaa2-console: Convert to platform remove callback returning void
soc/fsl: cpm: qmc: Convert to platform remove callback returning void
soc/fsl: cpm: tsa: Convert to platform remove callback returning void
soc/fujitsu: a64fx-diag: Convert to platform remove callback returning void
soc/hisilicon: kunpeng_hccs: Convert to platform remove callback returning void
soc/ixp4xx: ixp4xx-npe: Convert to platform remove callback returning void
soc/ixp4xx: ixp4xx-qmgr: Convert to platform remove callback returning void
soc/litex: litex_soc_ctrl: Convert to platform remove callback returning void
soc/loongson: loongson2_guts: Convert to platform remove callback returning void
soc/mediatek: mtk-devapc: Convert to platform remove callback returning void
soc/mediatek: mtk-mmsys: Convert to platform remove callback returning void
soc/pxa: ssp: Convert to platform remove callback returning void

drivers/soc/fsl/dpaa2-console.c | 6 ++----
drivers/soc/fsl/qe/qmc.c | 6 ++----
drivers/soc/fsl/qe/tsa.c | 5 ++---
drivers/soc/fujitsu/a64fx-diag.c | 6 ++----
drivers/soc/hisilicon/kunpeng_hccs.c | 6 ++----
drivers/soc/ixp4xx/ixp4xx-npe.c | 6 ++----
drivers/soc/ixp4xx/ixp4xx-qmgr.c | 5 ++---
drivers/soc/litex/litex_soc_ctrl.c | 5 ++---
drivers/soc/loongson/loongson2_guts.c | 6 ++----
drivers/soc/mediatek/mtk-devapc.c | 6 ++----
drivers/soc/mediatek/mtk-mmsys.c | 6 ++----
drivers/soc/pxa/ssp.c | 6 ++----
12 files changed, 24 insertions(+), 45 deletions(-)

--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | https://www.pengutronix.de/ |


Attachments:
(No filename) (5.13 kB)
signature.asc (499.00 B)
Download all attachments