* [PATCH v1] bus: qcom: Simplify with dev_err_probe()
@ 2024-08-29 12:41 Yu Jiaoliang
2024-08-30 7:22 ` Dmitry Baryshkov
2024-08-30 8:09 ` Krzysztof Kozlowski
0 siblings, 2 replies; 4+ messages in thread
From: Yu Jiaoliang @ 2024-08-29 12:41 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, linux-arm-msm, linux-kernel
Cc: opensource.kernel
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)) {
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v1] bus: qcom: Simplify with dev_err_probe()
2024-08-29 12:41 [PATCH v1] bus: qcom: Simplify with dev_err_probe() Yu Jiaoliang
@ 2024-08-30 7:22 ` Dmitry Baryshkov
2024-08-30 8:09 ` Krzysztof Kozlowski
1 sibling, 0 replies; 4+ messages in thread
From: Dmitry Baryshkov @ 2024-08-30 7:22 UTC (permalink / raw)
To: Yu Jiaoliang
Cc: Bjorn Andersson, Konrad Dybcio, linux-arm-msm, linux-kernel,
opensource.kernel
On Thu, Aug 29, 2024 at 08:41:18PM GMT, 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(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] bus: qcom: Simplify with dev_err_probe()
2024-08-29 12:41 [PATCH v1] bus: qcom: Simplify with dev_err_probe() Yu Jiaoliang
2024-08-30 7:22 ` Dmitry Baryshkov
@ 2024-08-30 8:09 ` Krzysztof Kozlowski
2024-08-30 8:21 ` 于佼良
1 sibling, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-30 8:09 UTC (permalink / raw)
To: Yu Jiaoliang, Bjorn Andersson, Konrad Dybcio, linux-arm-msm,
linux-kernel
Cc: opensource.kernel
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
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v1] bus: qcom: Simplify with dev_err_probe()
2024-08-30 8:09 ` Krzysztof Kozlowski
@ 2024-08-30 8:21 ` 于佼良
0 siblings, 0 replies; 4+ messages in thread
From: 于佼良 @ 2024-08-30 8:21 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: opensource.kernel, Bjorn Andersson, Konrad Dybcio,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-08-30 8:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-29 12:41 [PATCH v1] bus: qcom: Simplify with dev_err_probe() Yu Jiaoliang
2024-08-30 7:22 ` Dmitry Baryshkov
2024-08-30 8:09 ` Krzysztof Kozlowski
2024-08-30 8:21 ` 于佼良
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox