mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Mark Brown <broonie@kernel.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	Banajit Goswami <bgoswami@quicinc.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] ASoC: codecs: wcd934x: Simplify with dev_err_probe
Date: Mon, 17 Apr 2023 18:00:59 +0200	[thread overview]
Message-ID: <752c2dc1-65a9-a74a-d9ce-7db5ddbea5f8@linaro.org> (raw)
In-Reply-To: <5d753a8a-b979-43f6-a403-8a51f69bac29@sirena.org.uk>

On 17/04/2023 17:58, Mark Brown wrote:
> On Mon, Apr 17, 2023 at 05:43:03PM +0200, Krzysztof Kozlowski wrote:
>> On 17/04/2023 17:33, Mark Brown wrote:
>>> On Mon, Apr 17, 2023 at 04:14:51PM +0200, Krzysztof Kozlowski wrote:
> 
>>>> -	if (IS_ERR(wcd->if_regmap)) {
>>>> -		dev_err(dev, "Failed to allocate ifc register map\n");
>>>> -		return PTR_ERR(wcd->if_regmap);
>>>> -	}
>>>> +	if (IS_ERR(wcd->if_regmap))
>>>> +		return dev_err_probe(dev, PTR_ERR(wcd->if_regmap),
>>>> +				     "Failed to allocate ifc register map\n");
> 
>>> This is a functional change.
> 
>> Hmm... I don't see it. Return value is the same, same message is
>> printed, same condition. Did I make some copy-paste error?
> 
> You've replaced an unconditional dev_err() with dev_err_probe().

Which is the core of this change... so what is here surprising? Yes,
that's functional change and I never wrote that dev_err_probe is equal
dev_err. It is similar but offers benefits and one difference - does not
print DEFER. Which is in general exactly what we want.

Best regards,
Krzysztof


  reply	other threads:[~2023-04-17 16:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-17 14:14 [PATCH 1/4] ASoC: codecs: wcd9335: " Krzysztof Kozlowski
2023-04-17 14:14 ` [PATCH 2/4] ASoC: codecs: wcd934x: " Krzysztof Kozlowski
2023-04-17 15:33   ` Mark Brown
2023-04-17 15:43     ` Krzysztof Kozlowski
2023-04-17 15:58       ` Mark Brown
2023-04-17 16:00         ` Krzysztof Kozlowski [this message]
2023-04-17 16:27           ` Mark Brown
2023-04-17 16:32             ` Krzysztof Kozlowski
2023-04-17 17:23               ` Mark Brown
2023-04-17 17:30                 ` Krzysztof Kozlowski
2023-04-17 17:46                   ` Mark Brown
2023-04-17 14:14 ` [PATCH 3/4] ASoC: codecs: wcd934x: Simplify &pdev->dev in probe Krzysztof Kozlowski
2023-04-17 14:14 ` [PATCH 4/4] ASoC: codecs: wcd938x: Simplify with dev_err_probe Krzysztof Kozlowski
2023-04-18 16:21 ` (subset) [PATCH 1/4] ASoC: codecs: wcd9335: " Mark Brown

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=752c2dc1-65a9-a74a-d9ce-7db5ddbea5f8@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bgoswami@quicinc.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tiwai@suse.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®