Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Javier Carrasco <javier.carrasco.cruz@gmail.com>
To: "Christophe JAILLET" <christophe.jaillet@wanadoo.fr>,
	"Xiaowei Song" <songxiaowei@hisilicon.com>,
	"Binghui Wang" <wangbinghui@hisilicon.com>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Rob Herring" <robh@kernel.org>,
	"Jonathan Cameron" <Jonathan.Cameron@Huawei.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] PCI: kirin: use dev_err_probe() in probe error paths
Date: Sat, 6 Jul 2024 22:12:05 +0200	[thread overview]
Message-ID: <13aaab26-6b9b-498b-b3b4-1f4bd4256b49@gmail.com> (raw)
In-Reply-To: <d42b25da-44d9-465f-b651-134c2179981b@wanadoo.fr>

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@Huawei.com>
>> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.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

  reply	other threads:[~2024-07-06 20:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-06 15:07 [PATCH 0/2] PCI: kirin: cleanup (dev_err_probe() and scoped loop) Javier Carrasco
2024-07-06 15:07 ` [PATCH 1/2] PCI: kirin: use dev_err_probe() in probe error paths Javier Carrasco
2024-07-06 19:47   ` Christophe JAILLET
2024-07-06 20:12     ` Javier Carrasco [this message]
2024-07-07  6:53   ` Krzysztof Wilczyński
2024-07-07 12:19     ` Javier Carrasco
2024-07-06 15:07 ` [PATCH 2/2] PCI: kirin: use for_each_available_child_of_node_scoped() Javier Carrasco

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=13aaab26-6b9b-498b-b3b4-1f4bd4256b49@gmail.com \
    --to=javier.carrasco.cruz@gmail.com \
    --cc=Jonathan.Cameron@Huawei.com \
    --cc=bhelgaas@google.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=kw@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=robh@kernel.org \
    --cc=songxiaowei@hisilicon.com \
    --cc=wangbinghui@hisilicon.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