mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Laurentiu Mihalcea <laurentiumihalcea111@gmail.com>
To: Daniel Baluta <daniel.baluta@gmail.com>,
	Xichao Zhao <zhao.xichao@vivo.com>,
	Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Cc: lgirdwood@gmail.com, peter.ujfalusi@linux.intel.com,
	yung-chuan.liao@linux.intel.com,
	ranjani.sridharan@linux.intel.com, daniel.baluta@nxp.com,
	broonie@kernel.org, perex@perex.cz, tiwai@suse.com,
	shawnguo@kernel.org, s.hauer@pengutronix.de,
	kai.vehmanen@linux.intel.com, pierre-louis.bossart@linux.dev,
	kernel@pengutronix.de, festevam@gmail.com,
	linux-sound@vger.kernel.org, imx@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: SOF: imx: Remove the use of dev_err_probe()
Date: Wed, 20 Aug 2025 12:24:40 +0300	[thread overview]
Message-ID: <00984350-97d2-4aaf-96c3-091f15ec1254@gmail.com> (raw)
In-Reply-To: <CAEnQRZB=fq7=ahMkFWaQ58SR_yftSTYqZKFBh7YEXz2M7PyXsQ@mail.gmail.com>


On 8/20/2025 10:04 AM, Daniel Baluta wrote:
> On Tue, Aug 19, 2025 at 2:29 PM Xichao Zhao <zhao.xichao@vivo.com> wrote:
>> The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
>> Therefore, remove the useless call to dev_err_probe(), and just
>> return the value instead.
>>
>> Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
> NACK on this.
>
> Quote from dev_err_probe documentation:
>
> ```
>  Using this helper in your probe function is totally fine even if @err
>  * is known to never be -EPROBE_DEFER.
>  * The benefit compared to a normal dev_err() is the standardized format
>  * of the error code, which is emitted symbolically (i.e. you get "EAGAIN"
>  * instead of "-35"), and having the error code returned allows more
>  * compact error paths.
> ```


AFAIK the kernel logs are verbose enough on OOM errors, which makes prints

such as the ones removed by this series unneeded (have a look at [1]). Normally,

you'd get a warning from checkpatch but I think these logs slipped through the

cracks because the error messages do not quite match the expected format?


[1]: https://lkml.org/lkml/2014/6/10/382


  reply	other threads:[~2025-08-20  9:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-19 11:26 Xichao Zhao
2025-08-20  7:04 ` Daniel Baluta
2025-08-20  9:24   ` Laurentiu Mihalcea [this message]
2025-08-20 17:26     ` Mark Brown
2025-08-20  9:29 ` Laurentiu Mihalcea
2025-08-25 20:04 ` 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=00984350-97d2-4aaf-96c3-091f15ec1254@gmail.com \
    --to=laurentiumihalcea111@gmail.com \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@gmail.com \
    --cc=daniel.baluta@nxp.com \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=kernel@pengutronix.de \
    --cc=laurentiu.mihalcea@nxp.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.dev \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=tiwai@suse.com \
    --cc=yung-chuan.liao@linux.intel.com \
    --cc=zhao.xichao@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®