linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] mmc: Minor cleanups and compile test
@ 2020-09-02 19:36 Krzysztof Kozlowski
  2020-09-02 19:36 ` [PATCH 01/11] mmc: bcm2835: Simplify with dev_err_probe() Krzysztof Kozlowski
                   ` (11 more replies)
  0 siblings, 12 replies; 24+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-02 19:36 UTC (permalink / raw)
  To: Ulf Hansson, Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, Nicolas Saenz Julienne, Jaehoon Chung,
	Jun Nie, Shawn Guo, Paul Cercueil, Kevin Hilman, Neil Armstrong,
	Jerome Brunet, Martin Blumenstingl, Al Cooper, Adrian Hunter,
	Michal Simek, Lars Povlsen, Steen Hegelund,
	Microchip Linux Driver Support, Thierry Reding, Jonathan Hunter,
	Arnd Bergmann, linux-mmc, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, linux-amlogic, linux-tegra
  Cc: 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,
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(-)

-- 
2.17.1


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

* [PATCH 01/11] mmc: bcm2835: Simplify with dev_err_probe()
  2020-09-02 19:36 [PATCH 00/11] mmc: Minor cleanups and compile test Krzysztof Kozlowski
@ 2020-09-02 19:36 ` Krzysztof Kozlowski
  2020-09-02 19:56   ` Florian Fainelli
  2020-09-02 19:36 ` [PATCH 02/11] mmc: davinci: " Krzysztof Kozlowski
                   ` (10 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-02 19:36 UTC (permalink / raw)
  To: Ulf Hansson, Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, Nicolas Saenz Julienne, Jaehoon Chung,
	Jun Nie, Shawn Guo, Paul Cercueil, Kevin Hilman, Neil Armstrong,
	Jerome Brunet, Martin Blumenstingl, Al Cooper, Adrian Hunter,
	Michal Simek, Lars Povlsen, Steen Hegelund,
	Microchip Linux Driver Support, Thierry Reding, Jonathan Hunter,
	Arnd Bergmann, linux-mmc, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, linux-amlogic, linux-tegra
  Cc: 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 <krzk@kernel.org>
---
 drivers/mmc/host/bcm2835.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
index a0767790a826..35320bc9dc02 100644
--- a/drivers/mmc/host/bcm2835.c
+++ b/drivers/mmc/host/bcm2835.c
@@ -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;
 	}
 
-- 
2.17.1


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

* [PATCH 02/11] mmc: davinci: Simplify with dev_err_probe()
  2020-09-02 19:36 [PATCH 00/11] mmc: Minor cleanups and compile test Krzysztof Kozlowski
  2020-09-02 19:36 ` [PATCH 01/11] mmc: bcm2835: Simplify with dev_err_probe() Krzysztof Kozlowski
@ 2020-09-02 19:36 ` Krzysztof Kozlowski
  2020-09-02 19:36 ` [PATCH 03/11] mmc: dw_mmc-zx: " Krzysztof Kozlowski
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-02 19:36 UTC (permalink / raw)
  To: Ulf Hansson, Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, Nicolas Saenz Julienne, Jaehoon Chung,
	Jun Nie, Shawn Guo, Paul Cercueil, Kevin Hilman, Neil Armstrong,
	Jerome Brunet, Martin Blumenstingl, Al Cooper, Adrian Hunter,
	Michal Simek, Lars Povlsen, Steen Hegelund,
	Microchip Linux Driver Support, Thierry Reding, Jonathan Hunter,
	Arnd Bergmann, linux-mmc, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, linux-amlogic, linux-tegra
  Cc: 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 <krzk@kernel.org>
---
 drivers/mmc/host/davinci_mmc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
index e50a08bce7ef..fad1010fb52b 100644
--- a/drivers/mmc/host/davinci_mmc.c
+++ b/drivers/mmc/host/davinci_mmc.c
@@ -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 {
-- 
2.17.1


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

* [PATCH 03/11] mmc: dw_mmc-zx: Simplify with dev_err_probe()
  2020-09-02 19:36 [PATCH 00/11] mmc: Minor cleanups and compile test Krzysztof Kozlowski
  2020-09-02 19:36 ` [PATCH 01/11] mmc: bcm2835: Simplify with dev_err_probe() Krzysztof Kozlowski
  2020-09-02 19:36 ` [PATCH 02/11] mmc: davinci: " Krzysztof Kozlowski
@ 2020-09-02 19:36 ` Krzysztof Kozlowski
  2020-09-02 19:36 ` [PATCH 04/11] mmc: jz4740: " Krzysztof Kozlowski
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-02 19:36 UTC (permalink / raw)
  To: Ulf Hansson, Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, Nicolas Saenz Julienne, Jaehoon Chung,
	Jun Nie, Shawn Guo, Paul Cercueil, Kevin Hilman, Neil Armstrong,
	Jerome Brunet, Martin Blumenstingl, Al Cooper, Adrian Hunter,
	Michal Simek, Lars Povlsen, Steen Hegelund,
	Microchip Linux Driver Support, Thierry Reding, Jonathan Hunter,
	Arnd Bergmann, linux-mmc, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, linux-amlogic, linux-tegra
  Cc: 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 <krzk@kernel.org>
---
 drivers/mmc/host/dw_mmc-zx.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc-zx.c b/drivers/mmc/host/dw_mmc-zx.c
index eada648b27ec..d9e483432a61 100644
--- a/drivers/mmc/host/dw_mmc-zx.c
+++ b/drivers/mmc/host/dw_mmc-zx.c
@@ -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;
 	}
-- 
2.17.1


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

* [PATCH 04/11] mmc: jz4740: Simplify with dev_err_probe()
  2020-09-02 19:36 [PATCH 00/11] mmc: Minor cleanups and compile test Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2020-09-02 19:36 ` [PATCH 03/11] mmc: dw_mmc-zx: " Krzysztof Kozlowski
@ 2020-09-02 19:36 ` Krzysztof Kozlowski
  2020-09-03 10:49   ` Paul Cercueil
  2020-09-02 19:36 ` [PATCH 05/11] mmc: meson: " Krzysztof Kozlowski
                   ` (7 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-02 19:36 UTC (permalink / raw)
  To: Ulf Hansson, Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, Nicolas Saenz Julienne, Jaehoon Chung,
	Jun Nie, Shawn Guo, Paul Cercueil, Kevin Hilman, Neil Armstrong,
	Jerome Brunet, Martin Blumenstingl, Al Cooper, Adrian Hunter,
	Michal Simek, Lars Povlsen, Steen Hegelund,
	Microchip Linux Driver Support, Thierry Reding, Jonathan Hunter,
	Arnd Bergmann, linux-mmc, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, linux-amlogic, linux-tegra
  Cc: 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 <krzk@kernel.org>
---
 drivers/mmc/host/jz4740_mmc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c
index 81d71010b474..0c5b52b53303 100644
--- a/drivers/mmc/host/jz4740_mmc.c
+++ b/drivers/mmc/host/jz4740_mmc.c
@@ -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;
 	}
 
-- 
2.17.1


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

* [PATCH 05/11] mmc: meson: Simplify with dev_err_probe()
  2020-09-02 19:36 [PATCH 00/11] mmc: Minor cleanups and compile test Krzysztof Kozlowski
                   ` (3 preceding siblings ...)
  2020-09-02 19:36 ` [PATCH 04/11] mmc: jz4740: " Krzysztof Kozlowski
@ 2020-09-02 19:36 ` Krzysztof Kozlowski
  2020-09-02 19:36 ` [RFT 06/11] mmc: sdhci-brcmstb: Simplify with optional clock and dev_err_probe() Krzysztof Kozlowski
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-02 19:36 UTC (permalink / raw)
  To: Ulf Hansson, Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, Nicolas Saenz Julienne, Jaehoon Chung,
	Jun Nie, Shawn Guo, Paul Cercueil, Kevin Hilman, Neil Armstrong,
	Jerome Brunet, Martin Blumenstingl, Al Cooper, Adrian Hunter,
	Michal Simek, Lars Povlsen, Steen Hegelund,
	Microchip Linux Driver Support, Thierry Reding, Jonathan Hunter,
	Arnd Bergmann, linux-mmc, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, linux-amlogic, linux-tegra
  Cc: 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 <krzk@kernel.org>
---
 drivers/mmc/host/meson-gx-mmc.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index 08a3b1c05acb..2802e4520783 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -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);
-- 
2.17.1


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

* [RFT 06/11] mmc: sdhci-brcmstb: Simplify with optional clock and dev_err_probe()
  2020-09-02 19:36 [PATCH 00/11] mmc: Minor cleanups and compile test Krzysztof Kozlowski
                   ` (4 preceding siblings ...)
  2020-09-02 19:36 ` [PATCH 05/11] mmc: meson: " Krzysztof Kozlowski
@ 2020-09-02 19:36 ` Krzysztof Kozlowski
  2020-09-02 19:58   ` Florian Fainelli
  2020-09-02 19:36 ` [PATCH 07/11] mmc: sdhci-of-arasan: Simplify with dev_err_probe() Krzysztof Kozlowski
                   ` (5 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-02 19:36 UTC (permalink / raw)
  To: Ulf Hansson, Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, Nicolas Saenz Julienne, Jaehoon Chung,
	Jun Nie, Shawn Guo, Paul Cercueil, Kevin Hilman, Neil Armstrong,
	Jerome Brunet, Martin Blumenstingl, Al Cooper, Adrian Hunter,
	Michal Simek, Lars Povlsen, Steen Hegelund,
	Microchip Linux Driver Support, Thierry Reding, Jonathan Hunter,
	Arnd Bergmann, linux-mmc, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, linux-amlogic, linux-tegra
  Cc: Krzysztof Kozlowski

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

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

---

Not tested on HW.
---
 drivers/mmc/host/sdhci-brcmstb.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c
index ad01f6451a95..876668827580 100644
--- a/drivers/mmc/host/sdhci-brcmstb.c
+++ b/drivers/mmc/host/sdhci-brcmstb.c
@@ -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;
-- 
2.17.1


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

* [PATCH 07/11] mmc: sdhci-of-arasan: Simplify with dev_err_probe()
  2020-09-02 19:36 [PATCH 00/11] mmc: Minor cleanups and compile test Krzysztof Kozlowski
                   ` (5 preceding siblings ...)
  2020-09-02 19:36 ` [RFT 06/11] mmc: sdhci-brcmstb: Simplify with optional clock and dev_err_probe() Krzysztof Kozlowski
@ 2020-09-02 19:36 ` Krzysztof Kozlowski
  2020-09-02 19:36 ` [PATCH 08/11] mmc: sdhci-tegra: " Krzysztof Kozlowski
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-02 19:36 UTC (permalink / raw)
  To: Ulf Hansson, Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, Nicolas Saenz Julienne, Jaehoon Chung,
	Jun Nie, Shawn Guo, Paul Cercueil, Kevin Hilman, Neil Armstrong,
	Jerome Brunet, Martin Blumenstingl, Al Cooper, Adrian Hunter,
	Michal Simek, Lars Povlsen, Steen Hegelund,
	Microchip Linux Driver Support, Thierry Reding, Jonathan Hunter,
	Arnd Bergmann, linux-mmc, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, linux-amlogic, linux-tegra
  Cc: 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 <krzk@kernel.org>
---
 drivers/mmc/host/sdhci-of-arasan.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
index f186fbd016b1..3aea46db2ea7 100644
--- a/drivers/mmc/host/sdhci-of-arasan.c
+++ b/drivers/mmc/host/sdhci-of-arasan.c
@@ -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;
 		}
 	}
-- 
2.17.1


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

* [PATCH 08/11] mmc: sdhci-tegra: Simplify with dev_err_probe()
  2020-09-02 19:36 [PATCH 00/11] mmc: Minor cleanups and compile test Krzysztof Kozlowski
                   ` (6 preceding siblings ...)
  2020-09-02 19:36 ` [PATCH 07/11] mmc: sdhci-of-arasan: Simplify with dev_err_probe() Krzysztof Kozlowski
@ 2020-09-02 19:36 ` Krzysztof Kozlowski
  2020-09-02 19:36 ` [PATCH 09/11] mmc: dw_mmc: " Krzysztof Kozlowski
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-02 19:36 UTC (permalink / raw)
  To: Ulf Hansson, Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, Nicolas Saenz Julienne, Jaehoon Chung,
	Jun Nie, Shawn Guo, Paul Cercueil, Kevin Hilman, Neil Armstrong,
	Jerome Brunet, Martin Blumenstingl, Al Cooper, Adrian Hunter,
	Michal Simek, Lars Povlsen, Steen Hegelund,
	Microchip Linux Driver Support, Thierry Reding, Jonathan Hunter,
	Arnd Bergmann, linux-mmc, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, linux-amlogic, linux-tegra
  Cc: 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 <krzk@kernel.org>
---
 drivers/mmc/host/sdhci-tegra.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index 0a3f9d024f2a..118528f3325d 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -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);
-- 
2.17.1


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

* [PATCH 09/11] mmc: dw_mmc: Simplify with dev_err_probe()
  2020-09-02 19:36 [PATCH 00/11] mmc: Minor cleanups and compile test Krzysztof Kozlowski
                   ` (7 preceding siblings ...)
  2020-09-02 19:36 ` [PATCH 08/11] mmc: sdhci-tegra: " Krzysztof Kozlowski
@ 2020-09-02 19:36 ` Krzysztof Kozlowski
  2020-09-02 19:36 ` [PATCH 10/11] mmc: sdhci-of-sparx5: Use proper printk format for dma_addr_t Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-02 19:36 UTC (permalink / raw)
  To: Ulf Hansson, Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, Nicolas Saenz Julienne, Jaehoon Chung,
	Jun Nie, Shawn Guo, Paul Cercueil, Kevin Hilman, Neil Armstrong,
	Jerome Brunet, Martin Blumenstingl, Al Cooper, Adrian Hunter,
	Michal Simek, Lars Povlsen, Steen Hegelund,
	Microchip Linux Driver Support, Thierry Reding, Jonathan Hunter,
	Arnd Bergmann, linux-mmc, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, linux-amlogic, linux-tegra
  Cc: Krzysztof Kozlowski

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

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/mmc/host/dw_mmc.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 0fba940544ca..43c5795691fb 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -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");
-- 
2.17.1


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

* [PATCH 10/11] mmc: sdhci-of-sparx5: Use proper printk format for dma_addr_t
  2020-09-02 19:36 [PATCH 00/11] mmc: Minor cleanups and compile test Krzysztof Kozlowski
                   ` (8 preceding siblings ...)
  2020-09-02 19:36 ` [PATCH 09/11] mmc: dw_mmc: " Krzysztof Kozlowski
@ 2020-09-02 19:36 ` Krzysztof Kozlowski
  2020-09-04  8:08   ` Lars Povlsen
  2020-09-02 19:36 ` [PATCH 11/11] mmc: host: Enable compile testing of multiple drivers Krzysztof Kozlowski
  2020-09-03  8:09 ` [PATCH 00/11] mmc: Minor cleanups and compile test Ulf Hansson
  11 siblings, 1 reply; 24+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-02 19:36 UTC (permalink / raw)
  To: Ulf Hansson, Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, Nicolas Saenz Julienne, Jaehoon Chung,
	Jun Nie, Shawn Guo, Paul Cercueil, Kevin Hilman, Neil Armstrong,
	Jerome Brunet, Martin Blumenstingl, Al Cooper, Adrian Hunter,
	Michal Simek, Lars Povlsen, Steen Hegelund,
	Microchip Linux Driver Support, Thierry Reding, Jonathan Hunter,
	Arnd Bergmann, linux-mmc, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, linux-amlogic, linux-tegra
  Cc: Krzysztof Kozlowski

dma_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=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/mmc/host/sdhci-of-sparx5.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci-of-sparx5.c b/drivers/mmc/host/sdhci-of-sparx5.c
index 14b5dad6575a..747f108a0ace 100644
--- a/drivers/mmc/host/sdhci-of-sparx5.c
+++ b/drivers/mmc/host/sdhci-of-sparx5.c
@@ -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;
-- 
2.17.1


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

* [PATCH 11/11] mmc: host: Enable compile testing of multiple drivers
  2020-09-02 19:36 [PATCH 00/11] mmc: Minor cleanups and compile test Krzysztof Kozlowski
                   ` (9 preceding siblings ...)
  2020-09-02 19:36 ` [PATCH 10/11] mmc: sdhci-of-sparx5: Use proper printk format for dma_addr_t Krzysztof Kozlowski
@ 2020-09-02 19:36 ` Krzysztof Kozlowski
  2020-09-02 21:32   ` Michał Mirosław
  2020-09-03  8:09 ` [PATCH 00/11] mmc: Minor cleanups and compile test Ulf Hansson
  11 siblings, 1 reply; 24+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-02 19:36 UTC (permalink / raw)
  To: Ulf Hansson, Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, Nicolas Saenz Julienne, Jaehoon Chung,
	Jun Nie, Shawn Guo, Paul Cercueil, Kevin Hilman, Neil Armstrong,
	Jerome Brunet, Martin Blumenstingl, Al Cooper, Adrian Hunter,
	Michal Simek, Lars Povlsen, Steen Hegelund,
	Microchip Linux Driver Support, Thierry Reding, Jonathan Hunter,
	Arnd Bergmann, linux-mmc, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, linux-amlogic, linux-tegra
  Cc: Krzysztof Kozlowski

Multiple MMC host controller driver can be compile tested as they do not
depend on architecture specific headers.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/mmc/host/Kconfig | 42 ++++++++++++++++++++++------------------
 1 file changed, 23 insertions(+), 19 deletions(-)

diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index b95f79f53395..ff5a88faf877 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -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.
-- 
2.17.1


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

* Re: [PATCH 01/11] mmc: bcm2835: Simplify with dev_err_probe()
  2020-09-02 19:36 ` [PATCH 01/11] mmc: bcm2835: Simplify with dev_err_probe() Krzysztof Kozlowski
@ 2020-09-02 19:56   ` Florian Fainelli
  0 siblings, 0 replies; 24+ messages in thread
From: Florian Fainelli @ 2020-09-02 19:56 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Ulf Hansson, Florian Fainelli, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, Nicolas Saenz Julienne,
	Jaehoon Chung, Jun Nie, Shawn Guo, Paul Cercueil, Kevin Hilman,
	Neil Armstrong, Jerome Brunet, Martin Blumenstingl, Al Cooper,
	Adrian Hunter, Michal Simek, Lars Povlsen, Steen Hegelund,
	Microchip Linux Driver Support, Thierry Reding, Jonathan Hunter,
	Arnd Bergmann, linux-mmc, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, linux-amlogic, linux-tegra



On 9/2/2020 12:36 PM, Krzysztof Kozlowski wrote:
> 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 <krzk@kernel.org>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

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

* Re: [RFT 06/11] mmc: sdhci-brcmstb: Simplify with optional clock and dev_err_probe()
  2020-09-02 19:36 ` [RFT 06/11] mmc: sdhci-brcmstb: Simplify with optional clock and dev_err_probe() Krzysztof Kozlowski
@ 2020-09-02 19:58   ` Florian Fainelli
  2020-09-03  8:09     ` Ulf Hansson
  0 siblings, 1 reply; 24+ messages in thread
From: Florian Fainelli @ 2020-09-02 19:58 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Ulf Hansson, Florian Fainelli, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, Nicolas Saenz Julienne,
	Jaehoon Chung, Jun Nie, Shawn Guo, Paul Cercueil, Kevin Hilman,
	Neil Armstrong, Jerome Brunet, Martin Blumenstingl, Al Cooper,
	Adrian Hunter, Michal Simek, Lars Povlsen, Steen Hegelund,
	Microchip Linux Driver Support, Thierry Reding, Jonathan Hunter,
	Arnd Bergmann, linux-mmc, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, linux-amlogic, linux-tegra



On 9/2/2020 12:36 PM, Krzysztof Kozlowski wrote:
> Only -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.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

This is actually an open coded version of devm_clk_get_optional(), so 
this is fine:

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

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

* Re: [PATCH 11/11] mmc: host: Enable compile testing of multiple drivers
  2020-09-02 19:36 ` [PATCH 11/11] mmc: host: Enable compile testing of multiple drivers Krzysztof Kozlowski
@ 2020-09-02 21:32   ` Michał Mirosław
  2020-09-03  5:39     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 24+ messages in thread
From: Michał Mirosław @ 2020-09-02 21:32 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Ulf Hansson, Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, Nicolas Saenz Julienne, Jaehoon Chung,
	Jun Nie, Shawn Guo, Paul Cercueil, Kevin Hilman, Neil Armstrong,
	Jerome Brunet, Martin Blumenstingl, Al Cooper, Adrian Hunter,
	Michal Simek, Lars Povlsen, Steen Hegelund,
	Microchip Linux Driver Support, Thierry Reding, Jonathan Hunter,
	Arnd Bergmann, linux-mmc, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, linux-amlogic, linux-tegra

On Wed, Sep 02, 2020 at 09:36:58PM +0200, Krzysztof Kozlowski wrote:
> Multiple MMC host controller driver can be compile tested as they do not
> depend on architecture specific headers.
[...]
> --- a/drivers/mmc/host/Kconfig
> +++ b/drivers/mmc/host/Kconfig
> @@ -178,7 +178,7 @@ config MMC_SDHCI_OF_AT91
[...]
>  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
[...]
>  config MMC_MOXART
>  	tristate "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

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

* Re: [PATCH 11/11] mmc: host: Enable compile testing of multiple drivers
  2020-09-02 21:32   ` Michał Mirosław
@ 2020-09-03  5:39     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 24+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-03  5:39 UTC (permalink / raw)
  To: Michał Mirosław
  Cc: Ulf Hansson, Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, Nicolas Saenz Julienne, Jaehoon Chung,
	Jun Nie, Shawn Guo, Paul Cercueil, Kevin Hilman, Neil Armstrong,
	Jerome Brunet, Martin Blumenstingl, Al Cooper, Adrian Hunter,
	Michal Simek, Lars Povlsen, Steen Hegelund,
	Microchip Linux Driver Support, Thierry Reding, Jonathan Hunter,
	Arnd Bergmann, linux-mmc, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, linux-amlogic, linux-tegra

On Wed, Sep 02, 2020 at 11:32:27PM +0200, Michał Mirosław wrote:
> On Wed, Sep 02, 2020 at 09:36:58PM +0200, Krzysztof Kozlowski wrote:
> > Multiple MMC host controller driver can be compile tested as they do not
> > depend on architecture specific headers.
> [...]
> > --- a/drivers/mmc/host/Kconfig
> > +++ b/drivers/mmc/host/Kconfig
> > @@ -178,7 +178,7 @@ config MMC_SDHCI_OF_AT91
> [...]
> >  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
> [...]
> >  config MMC_MOXART
> >  	tristate "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


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

* Re: [PATCH 00/11] mmc: Minor cleanups and compile test
  2020-09-02 19:36 [PATCH 00/11] mmc: Minor cleanups and compile test Krzysztof Kozlowski
                   ` (10 preceding siblings ...)
  2020-09-02 19:36 ` [PATCH 11/11] mmc: host: Enable compile testing of multiple drivers Krzysztof Kozlowski
@ 2020-09-03  8:09 ` Ulf Hansson
  2020-09-03  8:28   ` Krzysztof Kozlowski
  2020-09-10 22:55   ` Rob Herring
  11 siblings, 2 replies; 24+ messages in thread
From: Ulf Hansson @ 2020-09-03  8:09 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Florian Fainelli, Ray Jui, Scott Branden, BCM Kernel Feedback,
	Nicolas Saenz Julienne, Jaehoon Chung, Jun Nie, Shawn Guo,
	Paul Cercueil, Kevin Hilman, Neil Armstrong, Jerome Brunet,
	Martin Blumenstingl, Al Cooper, Adrian Hunter, Michal Simek,
	Lars Povlsen, Steen Hegelund, Microchip Linux Driver Support,
	Thierry Reding, Jonathan Hunter, Arnd Bergmann, linux-mmc,
	Linux Kernel Mailing List, linux-rpi-kernel, Linux ARM,
	open list:ARM/Amlogic Meson...,
	linux-tegra

On Wed, 2 Sep 2020 at 21:37, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> 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(-)
>
> --
> 2.17.1
>

Series applied for next, except 11, thanks!

Kind regards
Uffe

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

* Re: [RFT 06/11] mmc: sdhci-brcmstb: Simplify with optional clock and dev_err_probe()
  2020-09-02 19:58   ` Florian Fainelli
@ 2020-09-03  8:09     ` Ulf Hansson
  0 siblings, 0 replies; 24+ messages in thread
From: Ulf Hansson @ 2020-09-03  8:09 UTC (permalink / raw)
  To: Florian Fainelli, Krzysztof Kozlowski
  Cc: Ray Jui, Scott Branden, BCM Kernel Feedback,
	Nicolas Saenz Julienne, Jaehoon Chung, Jun Nie, Shawn Guo,
	Paul Cercueil, Kevin Hilman, Neil Armstrong, Jerome Brunet,
	Martin Blumenstingl, Al Cooper, Adrian Hunter, Michal Simek,
	Lars Povlsen, Steen Hegelund, Microchip Linux Driver Support,
	Thierry Reding, Jonathan Hunter, Arnd Bergmann, linux-mmc,
	Linux Kernel Mailing List, linux-rpi-kernel, Linux ARM,
	open list:ARM/Amlogic Meson...,
	linux-tegra

On Wed, 2 Sep 2020 at 21:58, Florian Fainelli <f.fainelli@gmail.com> wrote:
>
>
>
> On 9/2/2020 12:36 PM, Krzysztof Kozlowski wrote:
> > Only -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.
> >
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
>
> 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.

>
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>

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

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

* Re: [PATCH 00/11] mmc: Minor cleanups and compile test
  2020-09-03  8:09 ` [PATCH 00/11] mmc: Minor cleanups and compile test Ulf Hansson
@ 2020-09-03  8:28   ` Krzysztof Kozlowski
  2020-09-10 22:55   ` Rob Herring
  1 sibling, 0 replies; 24+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-03  8:28 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Florian Fainelli, Ray Jui, Scott Branden, BCM Kernel Feedback,
	Nicolas Saenz Julienne, Jaehoon Chung, Jun Nie, Shawn Guo,
	Paul Cercueil, Kevin Hilman, Neil Armstrong, Jerome Brunet,
	Martin Blumenstingl, Al Cooper, Adrian Hunter, Michal Simek,
	Lars Povlsen, Steen Hegelund, Microchip Linux Driver Support,
	Thierry Reding, Jonathan Hunter, Arnd Bergmann, linux-mmc,
	Linux Kernel Mailing List, linux-rpi-kernel, Linux ARM,
	open list:ARM/Amlogic Meson...,
	linux-tegra

On Thu, 3 Sep 2020 at 10:10, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> 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

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

* Re: [PATCH 04/11] mmc: jz4740: Simplify with dev_err_probe()
  2020-09-02 19:36 ` [PATCH 04/11] mmc: jz4740: " Krzysztof Kozlowski
@ 2020-09-03 10:49   ` Paul Cercueil
  2020-09-03 11:47     ` Ulf Hansson
  0 siblings, 1 reply; 24+ messages in thread
From: Paul Cercueil @ 2020-09-03 10:49 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Ulf Hansson, Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, Nicolas Saenz Julienne, Jaehoon Chung,
	Jun Nie, Shawn Guo, Kevin Hilman, Neil Armstrong, Jerome Brunet,
	Martin Blumenstingl, Al Cooper, Adrian Hunter, Michal Simek,
	Lars Povlsen, Steen Hegelund, Microchip Linux Driver Support,
	Thierry Reding, Jonathan Hunter, Arnd Bergmann, linux-mmc,
	linux-kernel, linux-rpi-kernel, linux-arm-kernel, linux-amlogic,
	linux-tegra

Hi Krzysztof,

Le mer. 2 sept. 2020 à 21:36, Krzysztof Kozlowski <krzk@kernel.org> a 
écrit :
> 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 <krzk@kernel.org>
> ---
>  drivers/mmc/host/jz4740_mmc.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mmc/host/jz4740_mmc.c 
> b/drivers/mmc/host/jz4740_mmc.c
> index 81d71010b474..0c5b52b53303 100644
> --- a/drivers/mmc/host/jz4740_mmc.c
> +++ b/drivers/mmc/host/jz4740_mmc.c
> @@ -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:
Reviewed-by: Paul Cercueil <paul@crapouillou.net>

Cheers,
-Paul

>  		goto err_free_host;
>  	}
> 
> --
> 2.17.1
> 



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

* Re: [PATCH 04/11] mmc: jz4740: Simplify with dev_err_probe()
  2020-09-03 10:49   ` Paul Cercueil
@ 2020-09-03 11:47     ` Ulf Hansson
  0 siblings, 0 replies; 24+ messages in thread
From: Ulf Hansson @ 2020-09-03 11:47 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Krzysztof Kozlowski, Florian Fainelli, Ray Jui, Scott Branden,
	BCM Kernel Feedback, Nicolas Saenz Julienne, Jaehoon Chung,
	Jun Nie, Shawn Guo, Kevin Hilman, Neil Armstrong, Jerome Brunet,
	Martin Blumenstingl, Al Cooper, Adrian Hunter, Michal Simek,
	Lars Povlsen, Steen Hegelund, Microchip Linux Driver Support,
	Thierry Reding, Jonathan Hunter, Arnd Bergmann, linux-mmc,
	Linux Kernel Mailing List, linux-rpi-kernel, Linux ARM,
	open list:ARM/Amlogic Meson...,
	linux-tegra

On Thu, 3 Sep 2020 at 12:50, Paul Cercueil <paul@crapouillou.net> wrote:
>
> Hi Krzysztof,
>
> Le mer. 2 sept. 2020 à 21:36, Krzysztof Kozlowski <krzk@kernel.org> a
> écrit :
> > 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 <krzk@kernel.org>
> > ---
> >  drivers/mmc/host/jz4740_mmc.c | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/mmc/host/jz4740_mmc.c
> > b/drivers/mmc/host/jz4740_mmc.c
> > index 81d71010b474..0c5b52b53303 100644
> > --- a/drivers/mmc/host/jz4740_mmc.c
> > +++ b/drivers/mmc/host/jz4740_mmc.c
> > @@ -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.

I can amend the patch when I rebase my branch next week, no need for a resend.

>
> With that said:
> Reviewed-by: Paul Cercueil <paul@crapouillou.net>

And I add your tag as well, thanks!

Kind regards
Uffe

>
> Cheers,
> -Paul
>
> >               goto err_free_host;
> >       }
> >
> > --
> > 2.17.1
> >
>
>

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

* Re: [PATCH 10/11] mmc: sdhci-of-sparx5: Use proper printk format for dma_addr_t
  2020-09-02 19:36 ` [PATCH 10/11] mmc: sdhci-of-sparx5: Use proper printk format for dma_addr_t Krzysztof Kozlowski
@ 2020-09-04  8:08   ` Lars Povlsen
  0 siblings, 0 replies; 24+ messages in thread
From: Lars Povlsen @ 2020-09-04  8:08 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Ulf Hansson, Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, Nicolas Saenz Julienne, Jaehoon Chung,
	Jun Nie, Shawn Guo, Paul Cercueil, Kevin Hilman, Neil Armstrong,
	Jerome Brunet, Martin Blumenstingl, Al Cooper, Adrian Hunter,
	Michal Simek, Lars Povlsen, Steen Hegelund,
	Microchip Linux Driver Support, Thierry Reding, Jonathan Hunter,
	Arnd Bergmann, linux-mmc, linux-kernel, linux-rpi-kernel,
	linux-arm-kernel, linux-amlogic, linux-tegra


Krzysztof Kozlowski writes:

> dma_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=]
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  drivers/mmc/host/sdhci-of-sparx5.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-of-sparx5.c b/drivers/mmc/host/sdhci-of-sparx5.c
> index 14b5dad6575a..747f108a0ace 100644
> --- a/drivers/mmc/host/sdhci-of-sparx5.c
> +++ b/drivers/mmc/host/sdhci-of-sparx5.c
> @@ -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;

Acked-by: Lars Povlsen <larc.povlsen@microchip.com>

-- 
Lars Povlsen,
Microchip

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

* Re: [PATCH 00/11] mmc: Minor cleanups and compile test
  2020-09-03  8:09 ` [PATCH 00/11] mmc: Minor cleanups and compile test Ulf Hansson
  2020-09-03  8:28   ` Krzysztof Kozlowski
@ 2020-09-10 22:55   ` Rob Herring
  2020-09-11  6:00     ` Krzysztof Kozlowski
  1 sibling, 1 reply; 24+ messages in thread
From: Rob Herring @ 2020-09-10 22:55 UTC (permalink / raw)
  To: Ulf Hansson, Krzysztof Kozlowski
  Cc: Neil Armstrong, Al Cooper, Linux Kernel Mailing List,
	Paul Cercueil, Thierry Reding, Jerome Brunet, Florian Fainelli,
	Kevin Hilman, Steen Hegelund, Michal Simek, Jonathan Hunter,
	Jaehoon Chung, BCM Kernel Feedback, Linux ARM, Arnd Bergmann,
	Martin Blumenstingl, Ray Jui,
	moderated list:BROADCOM BCM2835 ARM ARCHITECTURE, linux-tegra,
	open list:ARM/Amlogic Meson...,
	Lars Povlsen, Scott Branden, linux-mmc, Adrian Hunter,
	Microchip Linux Driver Support, Jun Nie, Shawn Guo,
	Nicolas Saenz Julienne

On Thu, Sep 3, 2020 at 2:40 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> On Wed, 2 Sep 2020 at 21:37, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >
> > 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(-)
> >
> > --
> > 2.17.1
> >
>
> 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 _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

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

* Re: [PATCH 00/11] mmc: Minor cleanups and compile test
  2020-09-10 22:55   ` Rob Herring
@ 2020-09-11  6:00     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 24+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-11  6:00 UTC (permalink / raw)
  To: Rob Herring
  Cc: Ulf Hansson, Neil Armstrong, Al Cooper,
	Linux Kernel Mailing List, Paul Cercueil, Thierry Reding,
	Jerome Brunet, Florian Fainelli, Kevin Hilman, Steen Hegelund,
	Michal Simek, Jonathan Hunter, Jaehoon Chung,
	BCM Kernel Feedback, Linux ARM, Arnd Bergmann,
	Martin Blumenstingl, Ray Jui,
	moderated list:BROADCOM BCM2835 ARM ARCHITECTURE, linux-tegra,
	open list:ARM/Amlogic Meson...,
	Lars Povlsen, Scott Branden, linux-mmc, Adrian Hunter,
	Microchip Linux Driver Support, Jun Nie, Shawn Guo,
	Nicolas Saenz Julienne

On Fri, 11 Sep 2020 at 00:55, Rob Herring <robh@kernel.org> wrote:
>
> On Thu, Sep 3, 2020 at 2:40 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
> >
> > On Wed, 2 Sep 2020 at 21:37, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> > >
> > > 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(-)
> > >
> > > --
> > > 2.17.1
> > >
> >
> > 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 _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.

That's quite good idea.

Best regards,
Krzysztof

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

end of thread, other threads:[~2020-09-11  6:00 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-02 19:36 [PATCH 00/11] mmc: Minor cleanups and compile test Krzysztof Kozlowski
2020-09-02 19:36 ` [PATCH 01/11] mmc: bcm2835: Simplify with dev_err_probe() Krzysztof Kozlowski
2020-09-02 19:56   ` Florian Fainelli
2020-09-02 19:36 ` [PATCH 02/11] mmc: davinci: " Krzysztof Kozlowski
2020-09-02 19:36 ` [PATCH 03/11] mmc: dw_mmc-zx: " Krzysztof Kozlowski
2020-09-02 19:36 ` [PATCH 04/11] mmc: jz4740: " Krzysztof Kozlowski
2020-09-03 10:49   ` Paul Cercueil
2020-09-03 11:47     ` Ulf Hansson
2020-09-02 19:36 ` [PATCH 05/11] mmc: meson: " Krzysztof Kozlowski
2020-09-02 19:36 ` [RFT 06/11] mmc: sdhci-brcmstb: Simplify with optional clock and dev_err_probe() Krzysztof Kozlowski
2020-09-02 19:58   ` Florian Fainelli
2020-09-03  8:09     ` Ulf Hansson
2020-09-02 19:36 ` [PATCH 07/11] mmc: sdhci-of-arasan: Simplify with dev_err_probe() Krzysztof Kozlowski
2020-09-02 19:36 ` [PATCH 08/11] mmc: sdhci-tegra: " Krzysztof Kozlowski
2020-09-02 19:36 ` [PATCH 09/11] mmc: dw_mmc: " Krzysztof Kozlowski
2020-09-02 19:36 ` [PATCH 10/11] mmc: sdhci-of-sparx5: Use proper printk format for dma_addr_t Krzysztof Kozlowski
2020-09-04  8:08   ` Lars Povlsen
2020-09-02 19:36 ` [PATCH 11/11] mmc: host: Enable compile testing of multiple drivers Krzysztof Kozlowski
2020-09-02 21:32   ` Michał Mirosław
2020-09-03  5:39     ` Krzysztof Kozlowski
2020-09-03  8:09 ` [PATCH 00/11] mmc: Minor cleanups and compile test Ulf Hansson
2020-09-03  8:28   ` Krzysztof Kozlowski
2020-09-10 22:55   ` Rob Herring
2020-09-11  6:00     ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).