linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kamil Konieczny <k.konieczny@samsung.com>
To: Krzysztof Kozlowski <krzk@kernel.org>,
	Vladimir Zapolskiy <vz@mleia.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	Rob Herring <robh+dt@kernel.org>,
	linux-crypto@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] crypto: s5p-sss - Pass error from clk_get and reduce verbosity on deferral
Date: Fri, 4 Sep 2020 11:06:28 +0200	[thread overview]
Message-ID: <fa83ffad-845d-1eb1-41d8-5e99f324763c@samsung.com> (raw)
In-Reply-To: <20200903180400.2865-3-krzk@kernel.org>



On 9/3/20 8:04 PM, Krzysztof Kozlowski wrote:
> Pass the error directly from devm_clk_get() to describe the real reason,
> instead of fixed ENOENT.  Do not print error messages on deferred probe.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  drivers/crypto/s5p-sss.c | 15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c
> index f67f1e22ecd1..e83145c43b18 100644
> --- a/drivers/crypto/s5p-sss.c
> +++ b/drivers/crypto/s5p-sss.c
> @@ -2201,11 +2201,10 @@ static int s5p_aes_probe(struct platform_device *pdev)
>  	}
>  
>  	pdata->clk = devm_clk_get(dev, variant->clk_names[0]);
> -	if (IS_ERR(pdata->clk)) {
> -		dev_err(dev, "failed to find secss clock %s\n",
> -			variant->clk_names[0]);
> -		return -ENOENT;
> -	}
> +	if (IS_ERR(pdata->clk))
> +		return dev_err_probe(dev, PTR_ERR(pdata->clk),
> +				     "failed to find secss clock %s\n",
> +				     variant->clk_names[0]);
>  
>  	err = clk_prepare_enable(pdata->clk);
>  	if (err < 0) {
> @@ -2217,9 +2216,9 @@ static int s5p_aes_probe(struct platform_device *pdev)
>  	if (variant->clk_names[1]) {
>  		pdata->pclk = devm_clk_get(dev, variant->clk_names[1]);
>  		if (IS_ERR(pdata->pclk)) {
> -			dev_err(dev, "failed to find clock %s\n",
> -				variant->clk_names[1]);
> -			err = -ENOENT;
> +			err = dev_err_probe(dev, PTR_ERR(pdata->pclk),
> +					    "failed to find clock %s\n",
> +					    variant->clk_names[1]);
>  			goto err_clk;
>  		}
>  
> 

Reviewed-by: Kamil Konieczny <k.konieczny@samsung.com>
Acked-by: Kamil Konieczny <k.konieczny@samsung.com>


  reply	other threads:[~2020-09-04  9:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200903180412eucas1p10d854b51ba650b27265f088b07c93b15@eucas1p1.samsung.com>
2020-09-03 18:03 ` [PATCH 1/3] dt-bindings: crypto: slimsss: Correct a typo in compatible Krzysztof Kozlowski
2020-09-03 18:03   ` [PATCH 2/3] crypto: s5p-sss - Add and fix kerneldoc Krzysztof Kozlowski
2020-09-04  9:07     ` Kamil Konieczny
2020-09-11  6:59     ` Herbert Xu
2020-09-03 18:04   ` [PATCH 3/3] crypto: s5p-sss - Pass error from clk_get and reduce verbosity on deferral Krzysztof Kozlowski
2020-09-04  9:06     ` Kamil Konieczny [this message]
2020-09-11  6:59     ` Herbert Xu
2020-09-04  9:07   ` [PATCH 1/3] dt-bindings: crypto: slimsss: Correct a typo in compatible Kamil Konieczny
2020-09-04  9:17     ` Krzysztof Kozlowski
2020-09-14 20:34   ` Rob Herring

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=fa83ffad-845d-1eb1-41d8-5e99f324763c@samsung.com \
    --to=k.konieczny@samsung.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=krzk@kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=vz@mleia.com \
    /path/to/YOUR_REPLY

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

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