Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
Cc: imx@lists.linux.dev, Frank.Li@kernel.org
Subject: Re: [PATCH 6/7] firmware: imx: ele: Use dev_err for error report
Date: Mon, 25 May 2026 08:57:47 +0000	[thread overview]
Message-ID: <20260525085748.2EAE51F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260525-ele-v1-v1-6-a9570c4bffc9@nxp.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The introduced dev_err() lacks a trailing newline, contains a typo, and introduces redundant OOM logging.
--

commit c914c76ccf6cf2fdb05859267c584040fec1d7b6
Author: Peng Fan <peng.fan@nxp.com>

firmware: imx: ele: Use dev_err for error report

This commit replaces a dev_dbg() call with dev_err() for reporting a
memory allocation failure in ele_get_info().

> diff --git a/drivers/firmware/imx/ele_base_msg.c b/drivers/firmware/imx/ele_base_msg.c
> index 05a518df38cd6..2f0046cd5ad06 100644
> --- a/drivers/firmware/imx/ele_base_msg.c
> +++ b/drivers/firmware/imx/ele_base_msg.c
> @@ -74,7 +74,7 @@ int ele_get_info(struct se_if_priv *priv, struct ele_dev_info *s_info)
>  						   &get_info_addr,
>  						   GFP_KERNEL);
>  	if (!get_info_data) {
> -		dev_dbg(priv->dev,
> +		dev_err(priv->dev,
>  			"%s: Failed to allocate get_info_addr.", __func__);

[Severity: Low]
Is it possible to add a trailing newline (\n) to this error message?
Without it, the kernel log output could be mangled or concatenated with
subsequent messages.

Also, does this message contain a typo? It mentions failing to allocate
get_info_addr, but the actual buffer being allocated is get_info_data.

Finally, since dma_alloc_coherent() already natively dumps a stack trace on
allocation failure, is this custom out-of-memory error message partially
redundant? While these string contents existed prior to this patch, promoting
it to dev_err() makes these formatting and style issues unconditionally
visible.

>  		return -ENOMEM;
>  	}

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260525-ele-v1-v1-0-a9570c4bffc9@nxp.com?part=6

  reply	other threads:[~2026-05-25  8:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-25  5:39 [PATCH 0/7] firmware: imx: ele: misc fixes Peng Fan (OSS)
2026-05-25  5:39 ` [PATCH 1/7] firmware: imx: ele: Correct check condition in se_if_rx_callback Peng Fan (OSS)
2026-05-25  6:23   ` sashiko-bot
2026-05-25  5:39 ` [PATCH 2/7] firmware: imx: ele: Correct ele_fw_authenticate API Peng Fan (OSS)
2026-05-25  7:02   ` sashiko-bot
2026-05-25  5:39 ` [PATCH 3/7] firmware: imx: ele: Bypass memcpy when ele_get_info() fails Peng Fan (OSS)
2026-05-25  7:37   ` sashiko-bot
2026-05-25  5:39 ` [PATCH 4/7] firmware: imx: ele: simplify SoC device registration Peng Fan (OSS)
2026-05-25  6:36   ` Pankaj Gupta
2026-05-25  8:09   ` sashiko-bot
2026-05-25  5:39 ` [PATCH 5/7] firmware: imx: ele: Correct check_hdr_exception_for_sz Peng Fan (OSS)
2026-05-25  8:49   ` sashiko-bot
2026-05-25  5:39 ` [PATCH 6/7] firmware: imx: ele: Use dev_err for error report Peng Fan (OSS)
2026-05-25  8:57   ` sashiko-bot [this message]
2026-05-25  5:39 ` [PATCH 7/7] firmware: imx: ele: Fix debug dump size handling Peng Fan (OSS)
2026-05-25  9:34   ` sashiko-bot
2026-06-01 20:03 ` [PATCH 0/7] firmware: imx: ele: misc fixes Frank.Li

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=20260525085748.2EAE51F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=imx@lists.linux.dev \
    --cc=sashiko-reviews@lists.linux.dev \
    /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