mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: 于佼良 <yujiaoliang@vivo.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: opensource.kernel <opensource.kernel@vivo.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1] bus: qcom: Simplify with dev_err_probe()
Date: Fri, 30 Aug 2024 08:21:20 +0000	[thread overview]
Message-ID: <3a79f02e-2da2-4b6f-a00e-7511a21f72e3@vivo.com> (raw)
In-Reply-To: <76fb94fb-abb9-4cb7-a477-9839d1bc6287@kernel.org>

在 2024/8/30 16:09, Krzysztof Kozlowski 写道:
> On 29/08/2024 14:41, Yu Jiaoliang wrote:
>> Error handling in probe() can be a bit simpler with dev_err_probe().
>>
>> Signed-off-by: Yu Jiaoliang <yujiaoliang@vivo.com>
>> ---
>>   drivers/bus/qcom-ebi2.c | 6 ++----
>>   1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/bus/qcom-ebi2.c b/drivers/bus/qcom-ebi2.c
>> index c1fef1b4bd89..dbd6a99bcc99 100644
>> --- a/drivers/bus/qcom-ebi2.c
>> +++ b/drivers/bus/qcom-ebi2.c
>> @@ -308,10 +308,8 @@ static int qcom_ebi2_probe(struct platform_device *pdev)
>>   		return PTR_ERR(ebi2xclk);
>>   
>>   	ret = clk_prepare_enable(ebi2xclk);
>> -	if (ret) {
>> -		dev_err(dev, "could not enable EBI2X clk (%d)\n", ret);
>> -		return ret;
>> -	}
>> +	if (ret)
>> +		return dev_err_probe(dev, ret, "could not enable EBI2X clk\n");
>>   
>>   	ebi2clk = devm_clk_get(dev, "ebi2");
>>   	if (IS_ERR(ebi2clk)) {
>
> This cannot defer, so not much benefits. And again you change only one
> place.
>
> That's pointless and churn.
>
> Best regards,
> Krzysztof
>
I apologize for the oversight. I will reconsider this modification and 
submit patches according to the granularity of the subsystem.

Best Regards,

Yu


      reply	other threads:[~2024-08-30  8:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-29 12:41 Yu Jiaoliang
2024-08-30  7:22 ` Dmitry Baryshkov
2024-08-30  8:09 ` Krzysztof Kozlowski
2024-08-30  8:21   ` 于佼良 [this message]

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=3a79f02e-2da2-4b6f-a00e-7511a21f72e3@vivo.com \
    --to=yujiaoliang@vivo.com \
    --cc=andersson@kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=opensource.kernel@vivo.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

all inboxes | Powered by JetHome®