linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] soc: aspeed: lpc-ctrl: Block error printing on probe defer cases
@ 2021-11-04 17:37 jae.hyun.yoo
  2021-11-05 17:05 ` Winiarska, Iwona
  2021-11-08  0:29 ` Andrew Jeffery
  0 siblings, 2 replies; 5+ messages in thread
From: jae.hyun.yoo @ 2021-11-04 17:37 UTC (permalink / raw)
  To: Joel Stanley, Andrew Jeffery, Iwona Winiarska, Chia-Wei Wang,
	Yang Yingliang, Jae Hyun Yoo
  Cc: linux-arm-kernel, linux-aspeed

From: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>

Add a checking code when it gets -EPROBE_DEFER while getting a clock
resource. In this case, it doesn't need to print out an error message
because the probing will be re-visited.

Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
---
v1 -> v2:
 * Simplified it using dev_err_probe. (Iwona)

 drivers/soc/aspeed/aspeed-lpc-ctrl.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/aspeed/aspeed-lpc-ctrl.c b/drivers/soc/aspeed/aspeed-lpc-ctrl.c
index 72771e018c42..258894ed234b 100644
--- a/drivers/soc/aspeed/aspeed-lpc-ctrl.c
+++ b/drivers/soc/aspeed/aspeed-lpc-ctrl.c
@@ -306,10 +306,9 @@ static int aspeed_lpc_ctrl_probe(struct platform_device *pdev)
 	}
 
 	lpc_ctrl->clk = devm_clk_get(dev, NULL);
-	if (IS_ERR(lpc_ctrl->clk)) {
-		dev_err(dev, "couldn't get clock\n");
-		return PTR_ERR(lpc_ctrl->clk);
-	}
+	if (IS_ERR(lpc_ctrl->clk))
+		return dev_err_probe(dev, PTR_ERR(lpc_ctrl->clk),
+				     "couldn't get clock\n");
 	rc = clk_prepare_enable(lpc_ctrl->clk);
 	if (rc) {
 		dev_err(dev, "couldn't enable clock\n");
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] soc: aspeed: lpc-ctrl: Block error printing on probe defer cases
  2021-11-04 17:37 [PATCH v2] soc: aspeed: lpc-ctrl: Block error printing on probe defer cases jae.hyun.yoo
@ 2021-11-05 17:05 ` Winiarska, Iwona
  2021-11-05 17:08   ` Jae Hyun Yoo
  2021-11-08  0:29 ` Andrew Jeffery
  1 sibling, 1 reply; 5+ messages in thread
From: Winiarska, Iwona @ 2021-11-05 17:05 UTC (permalink / raw)
  To: Yoo, Jae Hyun, yangyingliang@huawei.com, andrew@aj.id.au,
	chiawei_wang@aspeedtech.com, joel@jms.id.au,
	jae.hyun.yoo@linux.intel.com
  Cc: linux-arm-kernel@lists.infradead.org,
	linux-aspeed@lists.ozlabs.org

On Thu, 2021-11-04 at 10:37 -0700, jae.hyun.yoo@intel.com wrote:
> From: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
> 
> Add a checking code when it gets -EPROBE_DEFER while getting a clock
> resource. In this case, it doesn't need to print out an error message
> because the probing will be re-visited.
> 
> Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>

Reviewed-by: Iwona Winiarska <iwona.winiarska@intel.com>

-Iwona

> ---
> v1 -> v2:
>  * Simplified it using dev_err_probe. (Iwona)
> 
>  drivers/soc/aspeed/aspeed-lpc-ctrl.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/soc/aspeed/aspeed-lpc-ctrl.c b/drivers/soc/aspeed/aspeed-
> lpc-ctrl.c
> index 72771e018c42..258894ed234b 100644
> --- a/drivers/soc/aspeed/aspeed-lpc-ctrl.c
> +++ b/drivers/soc/aspeed/aspeed-lpc-ctrl.c
> @@ -306,10 +306,9 @@ static int aspeed_lpc_ctrl_probe(struct platform_device
> *pdev)
>         }
>  
>         lpc_ctrl->clk = devm_clk_get(dev, NULL);
> -       if (IS_ERR(lpc_ctrl->clk)) {
> -               dev_err(dev, "couldn't get clock\n");
> -               return PTR_ERR(lpc_ctrl->clk);
> -       }
> +       if (IS_ERR(lpc_ctrl->clk))
> +               return dev_err_probe(dev, PTR_ERR(lpc_ctrl->clk),
> +                                    "couldn't get clock\n");
>         rc = clk_prepare_enable(lpc_ctrl->clk);
>         if (rc) {
>                 dev_err(dev, "couldn't enable clock\n");

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] soc: aspeed: lpc-ctrl: Block error printing on probe defer cases
  2021-11-05 17:05 ` Winiarska, Iwona
@ 2021-11-05 17:08   ` Jae Hyun Yoo
  0 siblings, 0 replies; 5+ messages in thread
From: Jae Hyun Yoo @ 2021-11-05 17:08 UTC (permalink / raw)
  To: Winiarska, Iwona, Yoo, Jae Hyun, yangyingliang@huawei.com,
	andrew@aj.id.au, chiawei_wang@aspeedtech.com, joel@jms.id.au
  Cc: linux-arm-kernel@lists.infradead.org,
	linux-aspeed@lists.ozlabs.org

> Reviewed-by: Iwona Winiarska <iwona.winiarska@intel.com>

Thank a lot for your review.

-Jae

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] soc: aspeed: lpc-ctrl: Block error printing on probe defer cases
  2021-11-04 17:37 [PATCH v2] soc: aspeed: lpc-ctrl: Block error printing on probe defer cases jae.hyun.yoo
  2021-11-05 17:05 ` Winiarska, Iwona
@ 2021-11-08  0:29 ` Andrew Jeffery
  2021-11-08 18:45   ` Jae Hyun Yoo
  1 sibling, 1 reply; 5+ messages in thread
From: Andrew Jeffery @ 2021-11-08  0:29 UTC (permalink / raw)
  To: Jae Hyun Yoo, Joel Stanley, Winiarska, Iwona, Chia-Wei, Wang,
	Yang Yingliang, Jae Hyun Yoo
  Cc: linux-arm-kernel, linux-aspeed



On Fri, 5 Nov 2021, at 04:07, jae.hyun.yoo@intel.com wrote:
> From: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
>
> Add a checking code when it gets -EPROBE_DEFER while getting a clock
> resource. In this case, it doesn't need to print out an error message
> because the probing will be re-visited.
>
> Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>

Reviewed-by: Andrew Jeffery <andrew@aj.id.au>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] soc: aspeed: lpc-ctrl: Block error printing on probe defer cases
  2021-11-08  0:29 ` Andrew Jeffery
@ 2021-11-08 18:45   ` Jae Hyun Yoo
  0 siblings, 0 replies; 5+ messages in thread
From: Jae Hyun Yoo @ 2021-11-08 18:45 UTC (permalink / raw)
  To: Andrew Jeffery, Jae Hyun Yoo, Joel Stanley, Winiarska, Iwona,
	Chia-Wei, Wang, Yang Yingliang
  Cc: linux-arm-kernel, linux-aspeed

> Reviewed-by: Andrew Jeffery <andrew@aj.id.au>

Thanks a lot for your review.

-Jae


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-11-08 18:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-04 17:37 [PATCH v2] soc: aspeed: lpc-ctrl: Block error printing on probe defer cases jae.hyun.yoo
2021-11-05 17:05 ` Winiarska, Iwona
2021-11-05 17:08   ` Jae Hyun Yoo
2021-11-08  0:29 ` Andrew Jeffery
2021-11-08 18:45   ` Jae Hyun Yoo

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