mmc: Minor cleanups and compile test
Subsystems (12)
cover mmc: Minor cleanups and compile test
Hi,
Set of minor cleanups. Patches requiring more attention:
- 6/11: Testing and review would be appreciated,
- 11/11: I build tested multiple architectures but not all and definitely no all possible configs. This one could sit on the lists for few days so 0-day would try it.
Best regards,
Krzysztof
Krzysztof Kozlowski (11):
mmc: bcm2835: Simplify with dev_err_probe()
mmc: davinci: Simplify with dev_err_probe()
mmc: dw_mmc-zx: Simplify with dev_err_probe()
mmc: jz4740: Simplify with dev_err_probe()
mmc: meson: Simplify with dev_err_probe()
mmc: sdhci-brcmstb: Simplify with optional clock and dev_err_probe()
mmc: sdhci-of-arasan: Simplify with dev_err_probe()
mmc: sdhci-tegra: Simplify with dev_err_probe()
mmc: dw_mmc: Simplify with dev_err_probe()
mmc: sdhci-of-sparx5: Use proper printk format for dma_addr_t
mmc: host: Enable compile testing of multiple drivers
drivers/mmc/host/Kconfig | 42 ++++++++++++++++-------------- drivers/mmc/host/bcm2835.c | 4 +-- drivers/mmc/host/davinci_mmc.c | 5 ++-- drivers/mmc/host/dw_mmc-zx.c | 11 +++----- drivers/mmc/host/dw_mmc.c | 9 +++---- drivers/mmc/host/jz4740_mmc.c | 5 ++-- drivers/mmc/host/meson-gx-mmc.c | 16 ++++-------- drivers/mmc/host/sdhci-brcmstb.c | 12 ++++----- drivers/mmc/host/sdhci-of-arasan.c | 7 +++-- drivers/mmc/host/sdhci-of-sparx5.c | 4 +-- drivers/mmc/host/sdhci-tegra.c | 7 ++--- 11 files changed, 51 insertions(+), 71 deletions(-)
Signature · 7 lines
2.17.1 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
PATCH 1/11 mmc: bcm2835: Simplify with dev_err_probe()
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed.
--- drivers/mmc/host/bcm2835.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/mmc/host/bcm2835.c +1 -3
@@ -1406,9 +1406,7 @@ static int bcm2835_probe(struct platform_device *pdev) clk =devm_clk_get (dev,NULL );if (IS_ERR (clk)) { - ret =PTR_ERR (clk); -if (ret != -EPROBE_DEFER ) -dev_err (dev,"could not get clk: %d\n" , ret); + ret =dev_err_probe (dev,PTR_ERR (clk),"could not get clk\n" ); goto err; }
Signature · 1 line
2.17.1
Re: [PATCH 01/11] mmc: bcm2835: Simplify with dev_err_probe()
Quoted 4 lines · Krzysztof Kozlowski
Common pattern of handling deferred probe can be simplified with
dev_err_probe(). Less code and the error value gets printed.Signed-off-by Krzysztof Kozlowski <[email protected]>
Signature · 1 line
Florian
PATCH 2/11 mmc: davinci: Simplify with dev_err_probe()
In reply to Krzysztof KozlowskiCommon pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed.
--- drivers/mmc/host/davinci_mmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/mmc/host/davinci_mmc.c +2 -3
@@ -1240,9 +1240,8 @@ static int davinci_mmcsd_probe(struct platform_device *pdev) pdev->id_entry = match->data; ret =mmc_of_parse (mmc);if (ret) { -if (ret != -EPROBE_DEFER ) -dev_err (&pdev->dev, -"could not parse of data: %d\n" , ret); +dev_err_probe (&pdev->dev, ret, +"could not parse of data\n" ); goto parse_fail; } }else {
Signature · 1 line
2.17.1
PATCH 3/11 mmc: dw_mmc-zx: Simplify with dev_err_probe()
In reply to Krzysztof KozlowskiCommon pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed.
--- drivers/mmc/host/dw_mmc-zx.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/mmc/host/dw_mmc-zx.c +3 -8
@@ -155,7 +155,6 @@ static int dw_mci_zx_parse_dt(struct dw_mci *host)struct device_node *node;struct dw_mci_zx_priv_data *priv;struct regmap *sysc_base; -int ret;/* syscon is needed only by emmc */ node =of_parse_phandle (np,"zte,aon-syscon" ,0 );
@@ -163,13 +162,9 @@ static int dw_mci_zx_parse_dt(struct dw_mci *host) sysc_base =syscon_node_to_regmap (node);of_node_put (node); -if (IS_ERR (sysc_base)) { - ret =PTR_ERR (sysc_base); -if (ret != -EPROBE_DEFER ) -dev_err (host->dev,"Can't get syscon: %d\n" , - ret); -return ret; - } +if (IS_ERR (sysc_base)) +return dev_err_probe (host->dev,PTR_ERR (sysc_base), +"Can't get syscon\n" ); }else {return 0 ; }
Signature · 1 line
2.17.1
PATCH 4/11 mmc: jz4740: Simplify with dev_err_probe()
In reply to Krzysztof KozlowskiCommon pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed.
--- drivers/mmc/host/jz4740_mmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/mmc/host/jz4740_mmc.c +2 -3
@@ -991,9 +991,8 @@ static int jz4740_mmc_probe(struct platform_device* pdev) ret =mmc_of_parse (mmc);if (ret) { -if (ret != -EPROBE_DEFER ) -dev_err (&pdev->dev, -"could not parse device properties: %d\n" , ret); +dev_err_probe (&pdev->dev, ret, +"could not parse device properties\n" ); goto err_free_host; }
Signature · 1 line
2.17.1
Re: [PATCH 04/11] mmc: jz4740: Simplify with dev_err_probe()
Hi Krzysztof,
Quoted 13 lines · Krzysztof Kozlowski
Common pattern of handling deferred probe can be simplified with
dev_err_probe(). Less code and the error value gets printed.Signed-off-by Krzysztof Kozlowski <[email protected]>--- drivers/mmc/host/jz4740_mmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/mmc/host/jz4740_mmc.c +0
-0
drivers/mmc/host/jz4740_mmc.c static int jz4740_mmc_probe(struct · line 996
Quoted 9 lines
drivers/mmc/host/jz4740_mmc.c +2
-3@@ -991,9 +991,8 @@ static int jz4740_mmc_probe(struct platform_device* pdev) ret =mmc_of_parse (mmc);if (ret) { -if (ret != -EPROBE_DEFER ) -dev_err (&pdev->dev, -"could not parse device properties: %d\n" , ret); +dev_err_probe (&pdev->dev, ret, +"could not parse device properties\n" );
I think you can put that on one line.
With that said:
Cheers,
-Paul
Quoted 6 lines
drivers/mmc/host/jz4740_mmc.c +0
-1goto err_free_host; } --2.17.1
Re: [PATCH 04/11] mmc: jz4740: Simplify with dev_err_probe()
Quoted 21 lines · Paul Cercueil
Hi Krzysztof,
Le mer. 2 sept. 2020 à 21:36, Krzysztof Kozlowski <[email protected]> a écrit :
Quoted 16 lines
Common pattern of handling deferred probe can be simplified with
dev_err_probe(). Less code and the error value gets printed.Signed-off-by Krzysztof Kozlowski <[email protected]>--- drivers/mmc/host/jz4740_mmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/mmc/host/jz4740_mmc.c +0
-0@@ -991,9 +991,8 @@ static int jz4740_mmc_probe(struct platform_device* pdev)
Quoted 9 lines
drivers/mmc/host/jz4740_mmc.c static int jz4740_mmc_probe(struct platform_device* pdev) · line 995
Quoted 7 lines
drivers/mmc/host/jz4740_mmc.c +2
-3ret =mmc_of_parse (mmc);if (ret) { -if (ret != -EPROBE_DEFER ) -dev_err (&pdev->dev, -"could not parse device properties: %d\n" , ret); +dev_err_probe (&pdev->dev, ret, +"could not parse device properties\n" );I think you can put that on one line.
I can amend the patch when I rebase my branch next week, no need for a resend.
Quoted 3 lines
With that said:
Reviewed-by Paul Cercueil <[email protected]>
And I add your tag as well, thanks!
Kind regards
Uffe
Quoted 12 lines
Cheers,
-PaulQuoted 6 lines
drivers/mmc/host/jz4740_mmc.c +0
-1goto err_free_host; } --2.17.1
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
PATCH 5/11 mmc: meson: Simplify with dev_err_probe()
In reply to Krzysztof KozlowskiCommon pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed.
--- drivers/mmc/host/meson-gx-mmc.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-)
drivers/mmc/host/meson-gx-mmc.c +5 -11
@@ -426,11 +426,9 @@ static int meson_mmc_clk_init(struct meson_host *host)snprintf (name,sizeof (name),"clkin%d" , i); clk =devm_clk_get (host->dev, name); -if (IS_ERR (clk)) { -if (clk !=ERR_PTR (-EPROBE_DEFER )) -dev_err (host->dev,"Missing clock %s\n" , name); -return PTR_ERR (clk); - } +if (IS_ERR (clk)) +return dev_err_probe (host->dev,PTR_ERR (clk), +"Missing clock %s\n" , name); mux_parent_names[i] =__clk_get_name (clk); }
@@ -1077,12 +1075,8 @@ static int meson_mmc_probe(struct platform_device *pdev) } ret =device_reset_optional (&pdev->dev); -if (ret) { -if (ret != -EPROBE_DEFER ) -dev_err (&pdev->dev,"device reset failed: %d\n" , ret); - -return ret; - } +if (ret) +return dev_err_probe (&pdev->dev, ret,"device reset failed\n" ); res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); host->regs =devm_ioremap_resource (&pdev->dev, res);
Signature · 1 line
2.17.1
PATCH 6/11 mmc: sdhci-brcmstb: Simplify with optional clock and dev_err_probe()
In reply to Krzysztof KozlowskiOnly -ENOENT from devm_clk_get() means that clock is not present in device tree. Other errors have their own meaning and should not be ignored.
Simplify getting the clock which is in fact optional and also use dev_err_probe() for handling deferred.
---
Not tested on HW.
--- drivers/mmc/host/sdhci-brcmstb.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/mmc/host/sdhci-brcmstb.c +5 -7
@@ -235,13 +235,11 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)dev_dbg (&pdev->dev,"Probe found match for %s\n" , match->compatible); - clk =devm_clk_get (&pdev->dev,NULL ); -if (IS_ERR (clk)) { -if (PTR_ERR (clk) == -EPROBE_DEFER ) -return -EPROBE_DEFER ; -dev_err (&pdev->dev,"Clock not found in Device Tree\n" ); - clk =NULL ; - } + clk =devm_clk_get_optional (&pdev->dev,NULL ); +if (IS_ERR (clk)) +return dev_err_probe (&pdev->dev,PTR_ERR (clk), +"Failed to get clock from Device Tree\n" ); + res =clk_prepare_enable (clk);if (res)return res;
Signature · 1 line
2.17.1
Re: [RFT 06/11] mmc: sdhci-brcmstb: Simplify with optional clock and dev_err_probe()
Quoted 8 lines · Krzysztof Kozlowski
Only
-ENOENTfromdevm_clk_get()means that clock is not present in device tree. Other errors have their own meaning and should not be ignored.Simplify getting the clock which is in fact optional and also use
dev_err_probe()for handling deferred.Signed-off-by Krzysztof Kozlowski <[email protected]>
This is actually an open coded version of devm_clk_get_optional(), so this is fine:
Signature · 1 line
Florian
Re: [RFT 06/11] mmc: sdhci-brcmstb: Simplify with optional clock and dev_err_probe()
Quoted 8 lines · Florian Fainelli
Quoted 4 lines · Krzysztof Kozlowski
Only
-ENOENTfromdevm_clk_get()means that clock is not present in device tree. Other errors have their own meaning and should not be ignored.
Quoted 7 lines
Quoted 4 lines
Simplify getting the clock which is in fact optional and also use
dev_err_probe()for handling deferred.Signed-off-by Krzysztof Kozlowski <[email protected]>This is actually an open coded version of
devm_clk_get_optional(), so this is fine:
devm_clk_get_optional() treats -ENOENT specifically, so it's not an exact open coded version. I think that's why Krzysztof prefered to get it tested on HW.
Quoted 2 lines
Acked-by Florian Fainelli <[email protected]>
Thanks!
I am queuing this up for next, without waiting for explicit tests . There is time to get that from testing in linux-next anyway.
Kind regards
Uffe
PATCH 7/11 mmc: sdhci-of-arasan: Simplify with dev_err_probe()
In reply to Krzysztof KozlowskiCommon pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed.
--- drivers/mmc/host/sdhci-of-arasan.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/mmc/host/sdhci-of-arasan.c +3 -4
@@ -1543,10 +1543,9 @@ static int sdhci_arasan_probe(struct platform_device *pdev)of_node_put (node);if (IS_ERR (sdhci_arasan->soc_ctl_base)) { - ret =PTR_ERR (sdhci_arasan->soc_ctl_base); -if (ret != -EPROBE_DEFER ) -dev_err (&pdev->dev,"Can't get syscon: %d\n" , - ret); + ret =dev_err_probe (&pdev->dev, +PTR_ERR (sdhci_arasan->soc_ctl_base), +"Can't get syscon\n" ); goto err_pltfm_free; } }
Signature · 1 line
2.17.1
PATCH 8/11 mmc: sdhci-tegra: Simplify with dev_err_probe()
In reply to Krzysztof KozlowskiCommon pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed.
--- drivers/mmc/host/sdhci-tegra.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/mmc/host/sdhci-tegra.c +2 -5
@@ -1615,11 +1615,8 @@ static int sdhci_tegra_probe(struct platform_device *pdev) clk =devm_clk_get (mmc_dev (host->mmc),NULL );if (IS_ERR (clk)) { - rc =PTR_ERR (clk); - -if (rc != -EPROBE_DEFER ) -dev_err (&pdev->dev,"failed to get clock: %d\n" , rc); - + rc =dev_err_probe (&pdev->dev,PTR_ERR (clk), +"failed to get clock\n" ); goto err_clk_get; }clk_prepare_enable (clk);
Signature · 1 line
2.17.1
PATCH 9/11 mmc: dw_mmc: Simplify with dev_err_probe()
In reply to Krzysztof KozlowskiCommon pattern of handling deferred probe can be simplified with dev_err_probe(). Less code, the error value gets printed and real error from dw_mci_parse_dt() is passed further instead of fixed -EINVAL.
--- drivers/mmc/host/dw_mmc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/mmc/host/dw_mmc.c +3 -6
@@ -3161,12 +3161,9 @@ int dw_mci_probe(struct dw_mci *host)if (!host->pdata) { host->pdata =dw_mci_parse_dt (host); -if (PTR_ERR (host->pdata) == -EPROBE_DEFER ) { -return -EPROBE_DEFER ; - }else if (IS_ERR (host->pdata)) { -dev_err (host->dev,"platform data not available\n" ); -return -EINVAL ; - } +if (IS_ERR (host->pdata)) +return dev_err_probe (host->dev,PTR_ERR (host->pdata), +"platform data not available\n" ); } host->biu_clk =devm_clk_get (host->dev,"biu" );
Signature · 1 line
2.17.1
PATCH 10/11 mmc: sdhci-of-sparx5: Use proper printk format for dma_addr_t
In reply to Krzysztof Kozlowskidma_addr_t size varies between architectures so use dedicated printk format to fix compile testing warning (e.g. on 32-bit MIPS):
drivers/mmc/host/sdhci-of-sparx5.c:63:11: warning:
format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘dma_addr_t {aka unsigned int}’ [-Wformat=]
--- drivers/mmc/host/sdhci-of-sparx5.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/sdhci-of-sparx5.c +2 -2
@@ -60,8 +60,8 @@ static void sdhci_sparx5_adma_write_desc(struct sdhci_host *host, void **desc,return ; } -pr_debug ("%s: write_desc: splitting dma len %d, offset 0x%0llx\n" , -mmc_hostname (host->mmc), len, addr); +pr_debug ("%s: write_desc: splitting dma len %d, offset %pad\n" , +mmc_hostname (host->mmc), len, &addr); offset = addr & (SZ_128M -1 ); tmplen =SZ_128M - offset;
Signature · 1 line
2.17.1
Re: [PATCH 10/11] mmc: sdhci-of-sparx5: Use proper printk format for dma_addr_t
Quoted 16 lines · Krzysztof Kozlowski
dma_addr_tsize varies between architectures so use dedicated printk format to fix compile testing warning (e.g. on 32-bit MIPS):
drivers/mmc/host/sdhci-of-sparx5.c:63:11: warning:
format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘dma_addr_t {aka unsigned int}’ [-Wformat=]Signed-off-by Krzysztof Kozlowski <[email protected]>--- drivers/mmc/host/sdhci-of-sparx5.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/mmc/host/sdhci-of-sparx5.c +0
-0
drivers/mmc/host/sdhci-of-sparx5.c static void sdhci_sparx5_adma_write_desc(struct sdhci_host *host, void **desc, · line 67
Quoted 10 lines
drivers/mmc/host/sdhci-of-sparx5.c +2
-2@@ -60,8 +60,8 @@ static void sdhci_sparx5_adma_write_desc(struct sdhci_host *host, void **desc,return ; } -pr_debug ("%s: write_desc: splitting dma len %d, offset 0x%0llx\n" , -mmc_hostname (host->mmc), len, addr); +pr_debug ("%s: write_desc: splitting dma len %d, offset %pad\n" , +mmc_hostname (host->mmc), len, &addr); offset = addr & (SZ_128M -1 ); tmplen =SZ_128M - offset;
Signature · 2 lines
Lars Povlsen, Microchip
PATCH 11/11 mmc: host: Enable compile testing of multiple drivers
In reply to Krzysztof KozlowskiMultiple MMC host controller driver can be compile tested as they do not depend on architecture specific headers.
--- drivers/mmc/host/Kconfig | 42 ++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 19 deletions(-)
drivers/mmc/host/Kconfig +23 -19
@@ -178,7 +178,7 @@ config MMC_SDHCI_OF_AT91 config MMC_SDHCI_OF_ESDHC tristate "SDHCI OF support for the Freescale eSDHC controller" depends on MMC_SDHCI_PLTFM - depends on PPC || ARCH_MXC || ARCH_LAYERSCAPE + depends on PPC || ARCH_MXC || ARCH_LAYERSCAPE || COMPILE_TEST select MMC_SDHCI_IO_ACCESSORS select FSL_GUTS help
@@ -216,7 +216,7 @@ config MMC_SDHCI_OF_DWCMSHC config MMC_SDHCI_OF_SPARX5 tristate "SDHCI OF support for the MCHP Sparx5 SoC" depends on MMC_SDHCI_PLTFM - depends on ARCH_SPARX5 + depends on ARCH_SPARX5 || COMPILE_TEST help This selects the Secure Digital Host Controller Interface (SDHCI) found in the MCHP Sparx5 SoC.
@@ -238,7 +238,7 @@ config MMC_SDHCI_CADENCE config MMC_SDHCI_CNS3XXX tristate "SDHCI support on the Cavium Networks CNS3xxx SoC" - depends on ARCH_CNS3XXX + depends on ARCH_CNS3XXX || COMPILE_TEST depends on MMC_SDHCI_PLTFM help This selects the SDHCI support for CNS3xxx System-on-Chip devices.
@@ -262,7 +262,7 @@ config MMC_SDHCI_ESDHC_MCF config MMC_SDHCI_ESDHC_IMX tristate "SDHCI support for the Freescale eSDHC/uSDHC i.MX controller" - depends on ARCH_MXC + depends on ARCH_MXC || COMPILE_TEST depends on MMC_SDHCI_PLTFM select MMC_SDHCI_IO_ACCESSORS select MMC_CQHCI
@@ -276,7 +276,7 @@ config MMC_SDHCI_ESDHC_IMX config MMC_SDHCI_DOVE tristate "SDHCI support on Marvell's Dove SoC" - depends on ARCH_DOVE || MACH_DOVE + depends on ARCH_DOVE || MACH_DOVE || COMPILE_TEST depends on MMC_SDHCI_PLTFM select MMC_SDHCI_IO_ACCESSORS help
@@ -289,7 +289,7 @@ config MMC_SDHCI_DOVE config MMC_SDHCI_TEGRA tristate "SDHCI platform support for the Tegra SD/MMC Controller" - depends on ARCH_TEGRA + depends on ARCH_TEGRA || COMPILE_TEST depends on MMC_SDHCI_PLTFM select MMC_SDHCI_IO_ACCESSORS select MMC_CQHCI
@@ -301,7 +301,8 @@ config MMC_SDHCI_TEGRA config MMC_SDHCI_S3C tristate "SDHCI support on Samsung S3C SoC" - depends on MMC_SDHCI && (PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS) + depends on MMC_SDHCI + depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST help This selects the Secure Digital Host Controller Interface (SDHCI) often referrered to as the HSMMC block in some of the Samsung S3C
@@ -313,7 +314,7 @@ config MMC_SDHCI_S3C config MMC_SDHCI_SIRF tristate "SDHCI support on CSR SiRFprimaII and SiRFmarco SoCs" - depends on ARCH_SIRF + depends on ARCH_SIRF || COMPILE_TEST depends on MMC_SDHCI_PLTFM select MMC_SDHCI_IO_ACCESSORS help
@@ -351,7 +352,8 @@ config MMC_SDHCI_PXAV2 config MMC_SDHCI_SPEAR tristate "SDHCI support on ST SPEAr platform" - depends on MMC_SDHCI && PLAT_SPEAR + depends on MMC_SDHCI + depends on PLAT_SPEAR || COMPILE_TEST depends on OF help This selects the Secure Digital Host Controller Interface (SDHCI)
@@ -374,7 +376,7 @@ config MMC_SDHCI_S3C_DMA config MMC_SDHCI_BCM_KONA tristate "SDHCI support on Broadcom KONA platform" - depends on ARCH_BCM_MOBILE + depends on ARCH_BCM_MOBILE || COMPILE_TEST depends on MMC_SDHCI_PLTFM help This selects the Broadcom Kona Secure Digital Host Controller
@@ -422,7 +424,8 @@ config MMC_SDHCI_IPROC config MMC_MESON_GX tristate "Amlogic S905/GX*/AXG SD/MMC Host Controller support" - depends on ARCH_MESON && MMC + depends on MMC + depends on ARCH_MESON|| COMPILE_TEST help This selects support for the Amlogic SD/MMC Host Controller found on the S905/GX*/AXG family of SoCs. This controller is
@@ -458,7 +461,8 @@ config MMC_MESON_MX_SDIO config MMC_MOXART tristate "MOXART SD/MMC Host Controller support" - depends on ARCH_MOXART && MMC + depends on MMC + depends on ARCH_MOXART || COMPILE_TEST help This selects support for the MOXART SD/MMC Host Controller. MOXA provides one multi-functional card reader which can
@@ -467,7 +471,7 @@ config MMC_MOXART config MMC_SDHCI_ST tristate "SDHCI support on STMicroelectronics SoC" - depends on ARCH_STI || FSP2 + depends on ARCH_STI || FSP2 || COMPILE_TEST depends on MMC_SDHCI_PLTFM select MMC_SDHCI_IO_ACCESSORS help
@@ -587,7 +591,7 @@ config MMC_TIFM_SD config MMC_MVSDIO tristate "Marvell MMC/SD/SDIO host driver" - depends on PLAT_ORION + depends on PLAT_ORION || (COMPILE_TEST && ARM) depends on OF help This selects the Marvell SDIO host driver.
@@ -599,7 +603,7 @@ config MMC_MVSDIO config MMC_DAVINCI tristate "TI DAVINCI Multimedia Card Interface support" - depends on ARCH_DAVINCI + depends on ARCH_DAVINCI || COMPILE_TEST help This selects the TI DAVINCI Multimedia card Interface. If you have an DAVINCI board with a Multimedia Card slot,
@@ -628,7 +632,7 @@ config MMC_SPI config MMC_S3C tristate "Samsung S3C SD/MMC Card Interface support" - depends on ARCH_S3C24XX + depends on ARCH_S3C24XX || COMPILE_TEST depends on S3C24XX_DMAC help This selects a driver for the MCI interface found in
@@ -681,7 +685,7 @@ config MMC_SDRICOH_CS config MMC_SDHCI_SPRD tristate "Spreadtrum SDIO host Controller" - depends on ARCH_SPRD + depends on ARCH_SPRD || COMPILE_TEST depends on MMC_SDHCI_PLTFM select MMC_SDHCI_IO_ACCESSORS select MMC_HSQ
@@ -698,7 +702,7 @@ config MMC_TMIO_CORE config MMC_TMIO tristate "Toshiba Mobile IO Controller (TMIO) MMC/SD function support" - depends on MFD_TMIO || MFD_ASIC3 + depends on MFD_TMIO || MFD_ASIC3 || COMPILE_TEST select MMC_TMIO_CORE help This provides support for the SD/MMC cell found in TC6393XB,
@@ -971,7 +975,7 @@ config MMC_REALTEK_USB config MMC_SUNXI tristate "Allwinner sunxi SD/MMC Host Controller support" - depends on ARCH_SUNXI + depends on ARCH_SUNXI || COMPILE_TEST help This selects support for the SD/MMC Host Controller on Allwinner sunxi SoCs.
Signature · 1 line
2.17.1
Re: [PATCH 11/11] mmc: host: Enable compile testing of multiple drivers
Quoted 2 lines · Krzysztof Kozlowski
Multiple MMC host controller driver can be compile tested as they do not depend on architecture specific headers.
[...]
Quoted 3 lines
drivers/mmc/host/Kconfig +0
-0@@ -178,7 +178,7 @@ config MMC_SDHCI_OF_AT91
[...]
Quoted 5 lines
config
MMC_MESON_GXdrivers/mmc/host/Kconfig +2
-1tristate "Amlogic S905/GX*/AXG SD/MMC Host Controller support" - depends on ARCH_MESON && MMC + depends on MMC + depends on ARCH_MESON|| COMPILE_TEST
[...]
drivers/mmc/host/Kconfig config MMC_MESON_MX_SDIO · line 465
Quoted 5 lines
config
MMC_MOXARTdrivers/mmc/host/Kconfig +2
-1tristate "MOXART SD/MMC Host Controller support" - depends on ARCH_MOXART && MMC + depends on MMC + depends on ARCH_MOXART || COMPILE_TEST
[...]
You can drop 'MMC' from depends as the whole tree is under 'if MMC' already.
Best Regards,
Michał Mirosław
Re: [PATCH 11/11] mmc: host: Enable compile testing of multiple drivers
Quoted 14 lines · Michał Mirosław
Quoted 2 lines · Krzysztof Kozlowski
Multiple MMC host controller driver can be compile tested as they do not depend on architecture specific headers.
[...]
Quoted 3 lines
drivers/mmc/host/Kconfig +0
-0@@ -178,7 +178,7 @@ config MMC_SDHCI_OF_AT91[...]
Quoted 5 lines
config
MMC_MESON_GXdrivers/mmc/host/Kconfig +2
-1tristate "Amlogic S905/GX*/AXG SD/MMC Host Controller support" - depends on ARCH_MESON && MMC + depends on MMC + depends on ARCH_MESON|| COMPILE_TEST[...]
Quoted 8 lines
drivers/mmc/host/Kconfig config MMC_MESON_MX_SDIO · line 465
Quoted 5 lines
config
MMC_MOXARTdrivers/mmc/host/Kconfig +2
-1tristate "MOXART SD/MMC Host Controller support" - depends on ARCH_MOXART && MMC + depends on MMC + depends on ARCH_MOXART || COMPILE_TEST[...]
You can drop 'MMC' from depends as the whole tree is under 'if MMC' already.
Right, thanks for feedback.
Best regards,
Krzysztof
Quoted 38 lines · Krzysztof Kozlowski
Hi,
Set of minor cleanups. Patches requiring more attention:
- 6/11: Testing and review would be appreciated,
- 11/11: I build tested multiple architectures but not all and definitely no all possible configs. This one could sit on the lists for few days so 0-day would try it.Best regards,
KrzysztofKrzysztof Kozlowski (11):
mmc: bcm2835: Simplify withdev_err_probe()
mmc: davinci: Simplify withdev_err_probe()
mmc: dw_mmc-zx: Simplify withdev_err_probe()
mmc: jz4740: Simplify withdev_err_probe()
mmc: meson: Simplify withdev_err_probe()
mmc: sdhci-brcmstb: Simplify with optional clock anddev_err_probe()
mmc: sdhci-of-arasan: Simplify withdev_err_probe()
mmc: sdhci-tegra: Simplify withdev_err_probe()
mmc:dw_mmc: Simplify withdev_err_probe()
mmc: sdhci-of-sparx5: Use proper printk format fordma_addr_t
mmc: host: Enable compile testing of multiple driversdrivers/mmc/host/Kconfig | 42 ++++++++++++++++-------------- drivers/mmc/host/bcm2835.c | 4 +-- drivers/mmc/host/davinci_mmc.c | 5 ++-- drivers/mmc/host/dw_mmc-zx.c | 11 +++----- drivers/mmc/host/dw_mmc.c | 9 +++---- drivers/mmc/host/jz4740_mmc.c | 5 ++-- drivers/mmc/host/meson-gx-mmc.c | 16 ++++-------- drivers/mmc/host/sdhci-brcmstb.c | 12 ++++----- drivers/mmc/host/sdhci-of-arasan.c | 7 +++-- drivers/mmc/host/sdhci-of-sparx5.c | 4 +-- drivers/mmc/host/sdhci-tegra.c | 7 ++--- 11 files changed, 51 insertions(+), 71 deletions(-)
Quoted 3 lines
--
2.17.1
Series applied for next, except 11, thanks!
Kind regards
Uffe
Quoted 2 lines · Ulf Hansson
Series applied for next, except 11, thanks!
Thanks. I will fix pointed compile-test issues and send later a follow up, also removing the MMC dependency as pointed by Michał.
Best regards,
Krzysztof
Quoted 40 lines · Ulf Hansson
Quoted 38 lines · Krzysztof Kozlowski
Hi,
Set of minor cleanups. Patches requiring more attention:
- 6/11: Testing and review would be appreciated,
- 11/11: I build tested multiple architectures but not all and definitely no all possible configs. This one could sit on the lists for few days so 0-day would try it.Best regards,
KrzysztofKrzysztof Kozlowski (11):
mmc: bcm2835: Simplify withdev_err_probe()
mmc: davinci: Simplify withdev_err_probe()
mmc: dw_mmc-zx: Simplify withdev_err_probe()
mmc: jz4740: Simplify withdev_err_probe()
mmc: meson: Simplify withdev_err_probe()
mmc: sdhci-brcmstb: Simplify with optional clock anddev_err_probe()
mmc: sdhci-of-arasan: Simplify withdev_err_probe()
mmc: sdhci-tegra: Simplify withdev_err_probe()
mmc:dw_mmc: Simplify withdev_err_probe()
mmc: sdhci-of-sparx5: Use proper printk format fordma_addr_t
mmc: host: Enable compile testing of multiple driversdrivers/mmc/host/Kconfig | 42 ++++++++++++++++-------------- drivers/mmc/host/bcm2835.c | 4 +-- drivers/mmc/host/davinci_mmc.c | 5 ++-- drivers/mmc/host/dw_mmc-zx.c | 11 +++----- drivers/mmc/host/dw_mmc.c | 9 +++---- drivers/mmc/host/jz4740_mmc.c | 5 ++-- drivers/mmc/host/meson-gx-mmc.c | 16 ++++-------- drivers/mmc/host/sdhci-brcmstb.c | 12 ++++----- drivers/mmc/host/sdhci-of-arasan.c | 7 +++-- drivers/mmc/host/sdhci-of-sparx5.c | 4 +-- drivers/mmc/host/sdhci-tegra.c | 7 ++--- 11 files changed, 51 insertions(+), 71 deletions(-)
Quoted 5 lines
Quoted 3 lines
--
2.17.1Series applied for next, except 11, thanks!
I see there's a bunch of these already, but I think we can do better here than dev_err_probe. We have _optional variants for the case not getting a resource is not an error. So the called functions like devm_clk_get can print an error. We already have this for platform_get_irq along with a coccinelle script to fix cases. I have a WIP branch[1] doing this.
Rob
[1] git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git dev_err-removal
Quoted 46 lines · Rob Herring
Quoted 44 lines · Ulf Hansson
Quoted 41 lines · Krzysztof Kozlowski
Hi,
Set of minor cleanups. Patches requiring more attention:
- 6/11: Testing and review would be appreciated,
- 11/11: I build tested multiple architectures but not all and definitely no all possible configs. This one could sit on the lists for few days so 0-day would try it.Best regards,
KrzysztofKrzysztof Kozlowski (11):
mmc: bcm2835: Simplify withdev_err_probe()
mmc: davinci: Simplify withdev_err_probe()
mmc: dw_mmc-zx: Simplify withdev_err_probe()
mmc: jz4740: Simplify withdev_err_probe()
mmc: meson: Simplify withdev_err_probe()
mmc: sdhci-brcmstb: Simplify with optional clock anddev_err_probe()
mmc: sdhci-of-arasan: Simplify withdev_err_probe()
mmc: sdhci-tegra: Simplify withdev_err_probe()
mmc:dw_mmc: Simplify withdev_err_probe()
mmc: sdhci-of-sparx5: Use proper printk format fordma_addr_t
mmc: host: Enable compile testing of multiple driversdrivers/mmc/host/Kconfig | 42 ++++++++++++++++-------------- drivers/mmc/host/bcm2835.c | 4 +-- drivers/mmc/host/davinci_mmc.c | 5 ++-- drivers/mmc/host/dw_mmc-zx.c | 11 +++----- drivers/mmc/host/dw_mmc.c | 9 +++---- drivers/mmc/host/jz4740_mmc.c | 5 ++-- drivers/mmc/host/meson-gx-mmc.c | 16 ++++-------- drivers/mmc/host/sdhci-brcmstb.c | 12 ++++----- drivers/mmc/host/sdhci-of-arasan.c | 7 +++-- drivers/mmc/host/sdhci-of-sparx5.c | 4 +-- drivers/mmc/host/sdhci-tegra.c | 7 ++--- 11 files changed, 51 insertions(+), 71 deletions(-)--
2.17.1
Quoted 8 lines
Quoted 1 line
Series applied for next, except 11, thanks!
I see there's a bunch of these already, but I think we can do better here than
dev_err_probe. We have_optionalvariants for the case not getting a resource is not an error. So the called functions likedevm_clk_getcan print an error. We already have this forplatform_get_irqalong with a coccinelle script to fix cases. I have a WIP branch[1] doing this.
That's quite good idea.
Best regards,
Krzysztof