Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Yangtao Li <frank.li@vivo.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Florian Fainelli <florian.fainelli@broadcom.com>,
	Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	Broadcom internal kernel review list 
	<bcm-kernel-feedback-list@broadcom.com>,
	Kamal Dasu <kamal.dasu@broadcom.com>,
	Al Cooper <alcooperx@gmail.com>,
	Lars Povlsen <lars.povlsen@microchip.com>,
	Steen Hegelund <Steen.Hegelund@microchip.com>,
	Daniel Machon <daniel.machon@microchip.com>,
	UNGLinuxDriver@microchip.com
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 58/58] mmc: Convert to platform remove callback returning void
Date: Tue, 25 Jul 2023 14:22:47 +0300	[thread overview]
Message-ID: <ebb0a629-caa5-e038-341d-cc5f07683e7f@intel.com> (raw)
In-Reply-To: <9269d1ae-0dc4-e633-082e-ccd75efd103f@vivo.com>

On 25/07/23 11:13, Yangtao Li wrote:
> Hi Adria,
> 
> On 2023/7/14 15:49, Adrian Hunter wrote:
>> On 13/07/23 11:08, Yangtao Li 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 (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>
>>> ---
>>>   drivers/mmc/host/sdhci-bcm-kona.c  | 2 +-
>>>   drivers/mmc/host/sdhci-brcmstb.c   | 2 +-
>>>   drivers/mmc/host/sdhci-cadence.c   | 2 +-
>>>   drivers/mmc/host/sdhci-dove.c      | 2 +-
>>>   drivers/mmc/host/sdhci-iproc.c     | 2 +-
>>>   drivers/mmc/host/sdhci-of-esdhc.c  | 2 +-
>>>   drivers/mmc/host/sdhci-of-hlwd.c   | 2 +-
>>>   drivers/mmc/host/sdhci-of-sparx5.c | 2 +-
>>>   drivers/mmc/host/sdhci-pltfm.c     | 4 +---
>>>   drivers/mmc/host/sdhci-pltfm.h     | 2 +-
>>>   drivers/mmc/host/sdhci-pxav2.c     | 2 +-
>> Looks like drivers/mmc/host/sdhci-npcm.c was missed
> 
> 
> Neither [1] nor [2] can find this driver, what am I missing?

Sorry, it was some untracked rubbish left over in my tree.

In that case:

Acked-by: Adrian Hunter <adrian.hunter@intel.com>


> 
> [1]
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git/tree/drivers/mmc/host?h=next
> 
> [2]
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/mmc/host
> 
> 
> Thx,
> 
> Yangtao
> 
> 
>>
>>>   11 files changed, 11 insertions(+), 13 deletions(-)
>>>
>>> diff --git a/drivers/mmc/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c
>>> index 6a93a54fe067..2e3736603853 100644
>>> --- a/drivers/mmc/host/sdhci-bcm-kona.c
>>> +++ b/drivers/mmc/host/sdhci-bcm-kona.c
>>> @@ -319,7 +319,7 @@ static struct platform_driver sdhci_bcm_kona_driver = {
>>>           .of_match_table = sdhci_bcm_kona_of_match,
>>>       },
>>>       .probe        = sdhci_bcm_kona_probe,
>>> -    .remove        = sdhci_pltfm_unregister,
>>> +    .remove_new    = sdhci_pltfm_unregister,
>>>   };
>>>   module_platform_driver(sdhci_bcm_kona_driver);
>>>   diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c
>>> index 4c22337199cf..a2b6d8f2eeb6 100644
>>> --- a/drivers/mmc/host/sdhci-brcmstb.c
>>> +++ b/drivers/mmc/host/sdhci-brcmstb.c
>>> @@ -430,7 +430,7 @@ static struct platform_driver sdhci_brcmstb_driver = {
>>>           .of_match_table = of_match_ptr(sdhci_brcm_of_match),
>>>       },
>>>       .probe        = sdhci_brcmstb_probe,
>>> -    .remove        = sdhci_pltfm_unregister,
>>> +    .remove_new    = sdhci_pltfm_unregister,
>>>       .shutdown    = sdhci_brcmstb_shutdown,
>>>   };
>>>   diff --git a/drivers/mmc/host/sdhci-cadence.c b/drivers/mmc/host/sdhci-cadence.c
>>> index d2f625054689..1702a499b36a 100644
>>> --- a/drivers/mmc/host/sdhci-cadence.c
>>> +++ b/drivers/mmc/host/sdhci-cadence.c
>>> @@ -617,7 +617,7 @@ static struct platform_driver sdhci_cdns_driver = {
>>>           .of_match_table = sdhci_cdns_match,
>>>       },
>>>       .probe = sdhci_cdns_probe,
>>> -    .remove = sdhci_pltfm_unregister,
>>> +    .remove_new = sdhci_pltfm_unregister,
>>>   };
>>>   module_platform_driver(sdhci_cdns_driver);
>>>   diff --git a/drivers/mmc/host/sdhci-dove.c b/drivers/mmc/host/sdhci-dove.c
>>> index 5e5bf82e5976..75335dbf223c 100644
>>> --- a/drivers/mmc/host/sdhci-dove.c
>>> +++ b/drivers/mmc/host/sdhci-dove.c
>>> @@ -110,7 +110,7 @@ static struct platform_driver sdhci_dove_driver = {
>>>           .of_match_table = sdhci_dove_of_match_table,
>>>       },
>>>       .probe        = sdhci_dove_probe,
>>> -    .remove        = sdhci_pltfm_unregister,
>>> +    .remove_new    = sdhci_pltfm_unregister,
>>>   };
>>>     module_platform_driver(sdhci_dove_driver);
>>> diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
>>> index 86eb0045515e..0dbebcecd8fc 100644
>>> --- a/drivers/mmc/host/sdhci-iproc.c
>>> +++ b/drivers/mmc/host/sdhci-iproc.c
>>> @@ -432,7 +432,7 @@ static struct platform_driver sdhci_iproc_driver = {
>>>           .pm = &sdhci_pltfm_pmops,
>>>       },
>>>       .probe = sdhci_iproc_probe,
>>> -    .remove = sdhci_pltfm_unregister,
>>> +    .remove_new = sdhci_pltfm_unregister,
>>>       .shutdown = sdhci_iproc_shutdown,
>>>   };
>>>   module_platform_driver(sdhci_iproc_driver);
>>> diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
>>> index 48ca1cf15b19..5072b59f6165 100644
>>> --- a/drivers/mmc/host/sdhci-of-esdhc.c
>>> +++ b/drivers/mmc/host/sdhci-of-esdhc.c
>>> @@ -1521,7 +1521,7 @@ static struct platform_driver sdhci_esdhc_driver = {
>>>           .pm = &esdhc_of_dev_pm_ops,
>>>       },
>>>       .probe = sdhci_esdhc_probe,
>>> -    .remove = sdhci_pltfm_unregister,
>>> +    .remove_new = sdhci_pltfm_unregister,
>>>   };
>>>     module_platform_driver(sdhci_esdhc_driver);
>>> diff --git a/drivers/mmc/host/sdhci-of-hlwd.c b/drivers/mmc/host/sdhci-of-hlwd.c
>>> index 12675797b296..cba3ba48e9dc 100644
>>> --- a/drivers/mmc/host/sdhci-of-hlwd.c
>>> +++ b/drivers/mmc/host/sdhci-of-hlwd.c
>>> @@ -85,7 +85,7 @@ static struct platform_driver sdhci_hlwd_driver = {
>>>           .pm = &sdhci_pltfm_pmops,
>>>       },
>>>       .probe = sdhci_hlwd_probe,
>>> -    .remove = sdhci_pltfm_unregister,
>>> +    .remove_new = sdhci_pltfm_unregister,
>>>   };
>>>     module_platform_driver(sdhci_hlwd_driver);
>>> diff --git a/drivers/mmc/host/sdhci-of-sparx5.c b/drivers/mmc/host/sdhci-of-sparx5.c
>>> index 28e4ee69e100..26aaab068e00 100644
>>> --- a/drivers/mmc/host/sdhci-of-sparx5.c
>>> +++ b/drivers/mmc/host/sdhci-of-sparx5.c
>>> @@ -260,7 +260,7 @@ static struct platform_driver sdhci_sparx5_driver = {
>>>           .pm = &sdhci_pltfm_pmops,
>>>       },
>>>       .probe = sdhci_sparx5_probe,
>>> -    .remove = sdhci_pltfm_unregister,
>>> +    .remove_new = sdhci_pltfm_unregister,
>>>   };
>>>     module_platform_driver(sdhci_sparx5_driver);
>>> diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
>>> index 673e750a8490..72d07b49b0a3 100644
>>> --- a/drivers/mmc/host/sdhci-pltfm.c
>>> +++ b/drivers/mmc/host/sdhci-pltfm.c
>>> @@ -187,7 +187,7 @@ int sdhci_pltfm_register(struct platform_device *pdev,
>>>   }
>>>   EXPORT_SYMBOL_GPL(sdhci_pltfm_register);
>>>   -int sdhci_pltfm_unregister(struct platform_device *pdev)
>>> +void sdhci_pltfm_unregister(struct platform_device *pdev)
>>>   {
>>>       struct sdhci_host *host = platform_get_drvdata(pdev);
>>>       struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
>>> @@ -196,8 +196,6 @@ int sdhci_pltfm_unregister(struct platform_device *pdev)
>>>       sdhci_remove_host(host, dead);
>>>       clk_disable_unprepare(pltfm_host->clk);
>>>       sdhci_pltfm_free(pdev);
>>> -
>>> -    return 0;
>>>   }
>>>   EXPORT_SYMBOL_GPL(sdhci_pltfm_unregister);
>>>   diff --git a/drivers/mmc/host/sdhci-pltfm.h b/drivers/mmc/host/sdhci-pltfm.h
>>> index 9bd717ff784b..6e6a443dafd9 100644
>>> --- a/drivers/mmc/host/sdhci-pltfm.h
>>> +++ b/drivers/mmc/host/sdhci-pltfm.h
>>> @@ -102,7 +102,7 @@ extern void sdhci_pltfm_free(struct platform_device *pdev);
>>>   extern int sdhci_pltfm_register(struct platform_device *pdev,
>>>                   const struct sdhci_pltfm_data *pdata,
>>>                   size_t priv_size);
>>> -extern int sdhci_pltfm_unregister(struct platform_device *pdev);
>>> +extern void sdhci_pltfm_unregister(struct platform_device *pdev);
>>>     extern unsigned int sdhci_pltfm_clk_get_max_clock(struct sdhci_host *host);
>>>   diff --git a/drivers/mmc/host/sdhci-pxav2.c b/drivers/mmc/host/sdhci-pxav2.c
>>> index 91aca8f8d6ef..1c1e763ce209 100644
>>> --- a/drivers/mmc/host/sdhci-pxav2.c
>>> +++ b/drivers/mmc/host/sdhci-pxav2.c
>>> @@ -359,7 +359,7 @@ static struct platform_driver sdhci_pxav2_driver = {
>>>           .pm    = &sdhci_pltfm_pmops,
>>>       },
>>>       .probe        = sdhci_pxav2_probe,
>>> -    .remove        = sdhci_pltfm_unregister,
>>> +    .remove_new    = sdhci_pltfm_unregister,
>>>   };
>>>     module_platform_driver(sdhci_pxav2_driver);


  reply	other threads:[~2023-07-25 11:23 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-13  8:07 [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void Yangtao Li
2023-07-13  8:07 ` [PATCH 02/58] mmc: bcm2835: " Yangtao Li
2023-07-14 10:10   ` Florian Fainelli
2023-07-13  8:07 ` [PATCH 03/58] mmc: jz4740: " Yangtao Li
2023-07-13  8:20   ` Paul Cercueil
2023-07-13  8:07 ` [PATCH 04/58] mmc: litex_mmc: " Yangtao Li
2023-07-13  8:07 ` [PATCH 05/58] mmc: mtk-sd: " Yangtao Li
2023-07-13  8:07 ` [PATCH 06/58] mmc: cb710: " Yangtao Li
2023-07-14 14:15   ` Michał Mirosław
2023-07-13  8:07 ` [PATCH 07/58] mmc: davinci_mmc: " Yangtao Li
2023-07-13  8:07 ` [PATCH 08/58] mmc: dw_mmc: hi3798cv200: " Yangtao Li
2023-07-13  8:07 ` [PATCH 09/58] mmc: sdhci-pic32: " Yangtao Li
2023-07-14  9:49   ` Adrian Hunter
2023-07-13  8:07 ` [PATCH 10/58] mmc: sdhci: milbeaut: " Yangtao Li
2023-07-13  8:07 ` [PATCH 11/58] mmc: omap_hsmmc: " Yangtao Li
2023-07-13  8:07 ` [PATCH 12/58] mmc: sdhci-of-at91: " Yangtao Li
2023-07-13  8:07 ` [PATCH 13/58] mmc: omap: " Yangtao Li
2023-07-13  8:07 ` [PATCH 14/58] mmc: dw_mmc: exynos: " Yangtao Li
2023-07-13  8:11   ` Krzysztof Kozlowski
2023-07-13  9:02     ` Uwe Kleine-König
2023-07-13  8:07 ` [PATCH 15/58] mmc: sdhci-pxav3: " Yangtao Li
2023-07-13  8:07 ` [PATCH 16/58] mmc: rtsx_pci: " Yangtao Li
2023-07-13  9:06   ` Uwe Kleine-König
2023-07-13  8:07 ` [PATCH 17/58] mmc: sh_mmcif: " Yangtao Li
2023-07-13  8:07 ` [PATCH 18/58] mmc: meson-gx: " Yangtao Li
2023-07-13  8:07 ` [PATCH 19/58] mmc: xenon: " Yangtao Li
2023-07-13  8:07 ` [PATCH 20/58] mmc: sdhci-s3c: " Yangtao Li
2023-07-13  8:07 ` [PATCH 21/58] mmc: meson-mx-sdhc: " Yangtao Li
2023-07-13  8:07 ` [PATCH 22/58] mmc: rtsx_usb_sdmmc: " Yangtao Li
2023-07-13  8:07 ` [PATCH 23/58] mmc: mxs-mmc: " Yangtao Li
2023-07-13  8:07 ` [PATCH 24/58] mmc: sdhci_am654: " Yangtao Li
2023-07-13  9:08   ` Uwe Kleine-König
2023-07-13  8:07 ` [PATCH 25/58] mmc: uniphier-sd: " Yangtao Li
2023-07-13  9:09   ` Uwe Kleine-König
2023-07-13  8:07 ` [PATCH 26/58] mmc: f-sdh30: " Yangtao Li
2023-07-13  9:12   ` Uwe Kleine-König
2023-07-14  7:51   ` Adrian Hunter
2023-07-13  8:07 ` [PATCH 27/58] mmc: sdhci-of-arasan: " Yangtao Li
2023-07-13  8:07 ` [PATCH 28/58] mmc: sdhci-of-dwcmshc: " Yangtao Li
2023-07-13  8:07 ` [PATCH 29/58] mmc: au1xmmc: " Yangtao Li
2023-07-13  8:07 ` [PATCH 30/58] mmc: cavium-octeon: " Yangtao Li
2023-07-13  8:07 ` [PATCH 31/58] mmc: pxamci: " Yangtao Li
2023-07-13  8:07 ` [PATCH 32/58] mmc: moxart: " Yangtao Li
2023-07-13  8:07 ` [PATCH 33/58] mmc: sdhci-omap: " Yangtao Li
2023-07-13  8:07 ` [PATCH 34/58] mmc: sdhci-of-aspeed: " Yangtao Li
2023-07-13  9:13   ` Uwe Kleine-König
2023-07-13  8:07 ` [PATCH 35/58] mmc: meson-mx-sdio: " Yangtao Li
2023-07-13  8:07 ` [PATCH 36/58] mmc: sdhci-sprd: " Yangtao Li
2023-07-13  8:07 ` [PATCH 37/58] mmc: sdhci-tegra: " Yangtao Li
2023-07-13  8:07 ` [PATCH 38/58] mmc: sdhci-acpi: " Yangtao Li
2023-07-13  8:07 ` [PATCH 39/58] mmc: sdhci-esdhc-imx: " Yangtao Li
2023-07-13  8:07 ` [PATCH 40/58] mmc: sdhci-msm: " Yangtao Li
2023-07-13  8:44   ` Konrad Dybcio
2023-07-13  8:07 ` [PATCH 41/58] mmc: alcor: " Yangtao Li
2023-07-13  8:07 ` [PATCH 42/58] mmc: dw_mmc: rockchip: " Yangtao Li
2023-07-13  8:07 ` [PATCH 43/58] mmc: owl: " Yangtao Li
2023-07-13  8:07 ` [PATCH 44/58] mmc: wbsd: " Yangtao Li
2023-07-13  8:07 ` [PATCH 45/58] mmc: usdhi60rol0: " Yangtao Li
2023-07-13 11:44   ` Jesper Nilsson
2023-07-13  8:07 ` [PATCH 46/58] mmc: atmel-mci: " Yangtao Li
2023-07-13  8:07 ` [PATCH 47/58] mmc: sdhci-st: " Yangtao Li
2023-07-13  8:07 ` [PATCH 48/58] mmc: wmt-sdmmc: " Yangtao Li
2023-07-13  8:07 ` [PATCH 49/58] mmc: sdhci-esdhc-mcf: " Yangtao Li
2023-07-17 11:18   ` Angelo Dureghello
2023-07-13  8:07 ` [PATCH 50/58] mmc: sunplus-mmc: " Yangtao Li
2023-07-13  8:08 ` [PATCH 51/58] mmc: sdhci-spear: " Yangtao Li
2023-07-13  8:24   ` Viresh Kumar
2023-07-13  8:08 ` [PATCH 52/58] mmc: mxcmmc: " Yangtao Li
2023-07-13  8:08 ` [PATCH 53/58] mmc: mvsdio: " Yangtao Li
2023-07-13  8:08 ` [PATCH 54/58] mmc: pwrseq_simple: " Yangtao Li
2023-07-13  8:08 ` [PATCH 55/58] mmc: pwrseq: sd8787: " Yangtao Li
2023-07-13  8:08 ` [PATCH 56/58] mmc: pwrseq: " Yangtao Li
2023-07-13  8:08 ` [PATCH 57/58] mmc: renesas_sdhi: " Yangtao Li
2023-07-13 10:18   ` Geert Uytterhoeven
2023-07-13  8:08 ` [PATCH 58/58] mmc: " Yangtao Li
2023-07-14  7:49   ` Adrian Hunter
2023-07-25  8:13     ` Yangtao Li
2023-07-25 11:22       ` Adrian Hunter [this message]
2023-07-14 10:12   ` Florian Fainelli
2023-07-13 15:13 ` [PATCH 01/58] mmc: sunxi: " Jernej Škrabec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ebb0a629-caa5-e038-341d-cc5f07683e7f@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=Steen.Hegelund@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alcooperx@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=daniel.machon@microchip.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=frank.li@vivo.com \
    --cc=kamal.dasu@broadcom.com \
    --cc=lars.povlsen@microchip.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox