diff mbox series

[v2] drm: panfrost: Silence warnings during deferred probe

Message ID 20200228094026.26983-1-m.szyprowski@samsung.com
State New
Headers show
Series [v2] drm: panfrost: Silence warnings during deferred probe | expand

Commit Message

Marek Szyprowski Feb. 28, 2020, 9:40 a.m. UTC
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

---
v2:
- fixed build warning
---
 drivers/gpu/drm/panfrost/panfrost_device.c | 26 +++++++++++++++-------
 1 file changed, 18 insertions(+), 8 deletions(-)

-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Comments

Daniel Stone Feb. 28, 2020, 11:12 a.m. UTC | #1
On Fri, 28 Feb 2020 at 09:40, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>


Reviewed-by: Daniel Stone <daniels@collabora.com>

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Alyssa Rosenzweig Feb. 28, 2020, 11:41 a.m. UTC | #2
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>


On Fri, Feb 28, 2020 at 10:40:26AM +0100, Marek Szyprowski wrote:
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

> ---

> v2:

> - fixed build warning

> ---

>  drivers/gpu/drm/panfrost/panfrost_device.c | 26 +++++++++++++++-------

>  1 file changed, 18 insertions(+), 8 deletions(-)

> 

> diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c

> index 238fb6d54df4..2c4ada3041b1 100644

> --- a/drivers/gpu/drm/panfrost/panfrost_device.c

> +++ b/drivers/gpu/drm/panfrost/panfrost_device.c

> @@ -21,7 +21,9 @@ static int panfrost_reset_init(struct panfrost_device *pfdev)

>  

>  	pfdev->rstc = devm_reset_control_array_get(pfdev->dev, false, true);

>  	if (IS_ERR(pfdev->rstc)) {

> -		dev_err(pfdev->dev, "get reset failed %ld\n", PTR_ERR(pfdev->rstc));

> +		if (PTR_ERR(pfdev->rstc) != -EPROBE_DEFER)

> +			dev_err(pfdev->dev, "get reset failed %ld\n",

> +				PTR_ERR(pfdev->rstc));

>  		return PTR_ERR(pfdev->rstc);

>  	}

>  

> @@ -44,7 +46,9 @@ static int panfrost_clk_init(struct panfrost_device *pfdev)

>  

>  	pfdev->clock = devm_clk_get(pfdev->dev, NULL);

>  	if (IS_ERR(pfdev->clock)) {

> -		dev_err(pfdev->dev, "get clock failed %ld\n", PTR_ERR(pfdev->clock));

> +		if (PTR_ERR(pfdev->clock) != -EPROBE_DEFER)

> +			dev_err(pfdev->dev, "get clock failed %ld\n",

> +				PTR_ERR(pfdev->clock));

>  		return PTR_ERR(pfdev->clock);

>  	}

>  

> @@ -57,8 +61,9 @@ static int panfrost_clk_init(struct panfrost_device *pfdev)

>  

>  	pfdev->bus_clock = devm_clk_get_optional(pfdev->dev, "bus");

>  	if (IS_ERR(pfdev->bus_clock)) {

> -		dev_err(pfdev->dev, "get bus_clock failed %ld\n",

> -			PTR_ERR(pfdev->bus_clock));

> +		if (PTR_ERR(pfdev->bus_clock) != -EPROBE_DEFER)

> +			dev_err(pfdev->dev, "get bus_clock failed %ld\n",

> +				PTR_ERR(pfdev->bus_clock));

>  		return PTR_ERR(pfdev->bus_clock);

>  	}

>  

> @@ -92,7 +97,9 @@ static int panfrost_regulator_init(struct panfrost_device *pfdev)

>  	pfdev->regulator = devm_regulator_get(pfdev->dev, "mali");

>  	if (IS_ERR(pfdev->regulator)) {

>  		ret = PTR_ERR(pfdev->regulator);

> -		dev_err(pfdev->dev, "failed to get regulator: %d\n", ret);

> +		if (ret != -EPROBE_DEFER)

> +			dev_err(pfdev->dev, "failed to get regulator: %d\n",

> +				ret);

>  		return ret;

>  	}

>  

> @@ -124,19 +131,22 @@ int panfrost_device_init(struct panfrost_device *pfdev)

>  

>  	err = panfrost_clk_init(pfdev);

>  	if (err) {

> -		dev_err(pfdev->dev, "clk init failed %d\n", err);

> +		if (err != -EPROBE_DEFER)

> +			dev_err(pfdev->dev, "clk init failed %d\n", err);

>  		return err;

>  	}

>  

>  	err = panfrost_regulator_init(pfdev);

>  	if (err) {

> -		dev_err(pfdev->dev, "regulator init failed %d\n", err);

> +		if (err != -EPROBE_DEFER)

> +			dev_err(pfdev->dev, "regulator init failed %d\n", err);

>  		goto err_out0;

>  	}

>  

>  	err = panfrost_reset_init(pfdev);

>  	if (err) {

> -		dev_err(pfdev->dev, "reset init failed %d\n", err);

> +		if (err != -EPROBE_DEFER)

> +			dev_err(pfdev->dev, "reset init failed %d\n", err);

>  		goto err_out1;

>  	}

>  

> -- 

> 2.17.1

>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Steven Price March 2, 2020, 3:38 p.m. UTC | #3
On 28/02/2020 09:40, Marek Szyprowski wrote:
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>


Reviewed-by: Steven Price <steven.price@arm.com>

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c
index 238fb6d54df4..2c4ada3041b1 100644
--- a/drivers/gpu/drm/panfrost/panfrost_device.c
+++ b/drivers/gpu/drm/panfrost/panfrost_device.c
@@ -21,7 +21,9 @@  static int panfrost_reset_init(struct panfrost_device *pfdev)
 
 	pfdev->rstc = devm_reset_control_array_get(pfdev->dev, false, true);
 	if (IS_ERR(pfdev->rstc)) {
-		dev_err(pfdev->dev, "get reset failed %ld\n", PTR_ERR(pfdev->rstc));
+		if (PTR_ERR(pfdev->rstc) != -EPROBE_DEFER)
+			dev_err(pfdev->dev, "get reset failed %ld\n",
+				PTR_ERR(pfdev->rstc));
 		return PTR_ERR(pfdev->rstc);
 	}
 
@@ -44,7 +46,9 @@  static int panfrost_clk_init(struct panfrost_device *pfdev)
 
 	pfdev->clock = devm_clk_get(pfdev->dev, NULL);
 	if (IS_ERR(pfdev->clock)) {
-		dev_err(pfdev->dev, "get clock failed %ld\n", PTR_ERR(pfdev->clock));
+		if (PTR_ERR(pfdev->clock) != -EPROBE_DEFER)
+			dev_err(pfdev->dev, "get clock failed %ld\n",
+				PTR_ERR(pfdev->clock));
 		return PTR_ERR(pfdev->clock);
 	}
 
@@ -57,8 +61,9 @@  static int panfrost_clk_init(struct panfrost_device *pfdev)
 
 	pfdev->bus_clock = devm_clk_get_optional(pfdev->dev, "bus");
 	if (IS_ERR(pfdev->bus_clock)) {
-		dev_err(pfdev->dev, "get bus_clock failed %ld\n",
-			PTR_ERR(pfdev->bus_clock));
+		if (PTR_ERR(pfdev->bus_clock) != -EPROBE_DEFER)
+			dev_err(pfdev->dev, "get bus_clock failed %ld\n",
+				PTR_ERR(pfdev->bus_clock));
 		return PTR_ERR(pfdev->bus_clock);
 	}
 
@@ -92,7 +97,9 @@  static int panfrost_regulator_init(struct panfrost_device *pfdev)
 	pfdev->regulator = devm_regulator_get(pfdev->dev, "mali");
 	if (IS_ERR(pfdev->regulator)) {
 		ret = PTR_ERR(pfdev->regulator);
-		dev_err(pfdev->dev, "failed to get regulator: %d\n", ret);
+		if (ret != -EPROBE_DEFER)
+			dev_err(pfdev->dev, "failed to get regulator: %d\n",
+				ret);
 		return ret;
 	}
 
@@ -124,19 +131,22 @@  int panfrost_device_init(struct panfrost_device *pfdev)
 
 	err = panfrost_clk_init(pfdev);
 	if (err) {
-		dev_err(pfdev->dev, "clk init failed %d\n", err);
+		if (err != -EPROBE_DEFER)
+			dev_err(pfdev->dev, "clk init failed %d\n", err);
 		return err;
 	}
 
 	err = panfrost_regulator_init(pfdev);
 	if (err) {
-		dev_err(pfdev->dev, "regulator init failed %d\n", err);
+		if (err != -EPROBE_DEFER)
+			dev_err(pfdev->dev, "regulator init failed %d\n", err);
 		goto err_out0;
 	}
 
 	err = panfrost_reset_init(pfdev);
 	if (err) {
-		dev_err(pfdev->dev, "reset init failed %d\n", err);
+		if (err != -EPROBE_DEFER)
+			dev_err(pfdev->dev, "reset init failed %d\n", err);
 		goto err_out1;
 	}