[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <13aaab26-6b9b-498b-b3b4-1f4bd4256b49@gmail.com>
Date: Sat, 6 Jul 2024 22:12:05 +0200
From: Javier Carrasco <javier.carrasco.cruz@...il.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>,
Xiaowei Song <songxiaowei@...ilicon.com>,
Binghui Wang <wangbinghui@...ilicon.com>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Krzysztof Wilczyński <kw@...ux.com>,
Rob Herring <robh@...nel.org>, Jonathan Cameron
<Jonathan.Cameron@...wei.com>, Bjorn Helgaas <bhelgaas@...gle.com>
Cc: linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] PCI: kirin: use dev_err_probe() in probe error paths
On 06/07/2024 21:47, Christophe JAILLET wrote:
> Le 06/07/2024 à 17:07, Javier Carrasco a écrit :
>> dev_err_probe() is used in some probe error paths, yet the
>> "dev_err() + return" pattern is used in some others.
>>
>> Use dev_err_probe() in all error paths with that construction.
>>
>> Suggested-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
>> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@...il.com>
>> ---
>
> ...
>
>> - if (ret < 0) {
>> - dev_err(dev, "failed to parse devfn: %d\n", ret);
>> - return ret;
>> - }
>> + if (ret < 0)
>> + return dev_err_probe(dev, ret,
>> + "failed to parse devfn: %d\n", ret);
>
> Hi,
>
> with dev_err_probe(), there is no more need to add 'ret' explicitly in
> the message.
>
> CJ
You are right, thank you. I will remove that from the original message
for v2.
Best regards,
Javier Carrasco
Powered by blists - more mailing lists