mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peng Fan <peng.fan@nxp.com>
To: Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	 Pengutronix Kernel Team <kernel@pengutronix.de>,
	 Fabio Estevam <festevam@gmail.com>, Frank Li <frank.li@nxp.com>,
	 Dong Aisheng <aisheng.dong@nxp.com>
Cc: imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	 linux-kernel@vger.kernel.org, Peng Fan <peng.fan@nxp.com>,
	 Frank Li <Frank.Li@nxp.com>
Subject: [PATCH v2 6/8] firmware: imx: scu: Update error code
Date: Fri, 17 Oct 2025 09:56:29 +0800	[thread overview]
Message-ID: <20251017-imx-firmware-v2-6-b58f68ec2ea9@nxp.com> (raw)
In-Reply-To: <20251017-imx-firmware-v2-0-b58f68ec2ea9@nxp.com>

IMX_SC_ERR_NOTFOUND should map with -ENOENT, not -EEXIST. -ENODEV makes
more sense for IMX_SC_ERR_NOPOWER, and -ECOMM makes more sense for
IMX_SC_ERR_IPC.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/firmware/imx/imx-scu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/firmware/imx/imx-scu.c b/drivers/firmware/imx/imx-scu.c
index 8c28e25ddc8a650d2d191c40193cf1fb5e70bc35..6046156bc3c9abcd8f62b46f04571b1a9decc0eb 100644
--- a/drivers/firmware/imx/imx-scu.c
+++ b/drivers/firmware/imx/imx-scu.c
@@ -73,9 +73,9 @@ static int imx_sc_linux_errmap[IMX_SC_ERR_LAST] = {
 	-EACCES, /* IMX_SC_ERR_NOACCESS */
 	-EACCES, /* IMX_SC_ERR_LOCKED */
 	-ERANGE, /* IMX_SC_ERR_UNAVAILABLE */
-	-EEXIST, /* IMX_SC_ERR_NOTFOUND */
-	-EPERM,	 /* IMX_SC_ERR_NOPOWER */
-	-EPIPE,	 /* IMX_SC_ERR_IPC */
+	-ENOENT, /* IMX_SC_ERR_NOTFOUND */
+	-ENODEV, /* IMX_SC_ERR_NOPOWER */
+	-ECOMM,	 /* IMX_SC_ERR_IPC */
 	-EBUSY,	 /* IMX_SC_ERR_BUSY */
 	-EIO,	 /* IMX_SC_ERR_FAIL */
 };

-- 
2.37.1


  parent reply	other threads:[~2025-10-17  1:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-17  1:56 [PATCH v2 0/8] firmware: imx: scu: Misc update Peng Fan
2025-10-17  1:56 ` [PATCH v2 1/8] firmware: imx: scu-irq: fix OF node leak in Peng Fan
2025-10-17  1:56 ` [PATCH v2 2/8] firmware: imx: scu-irq: Free mailbox client on failure at imx_scu_enable_general_irq_channel() Peng Fan
2025-10-17 14:21   ` Frank Li
2025-10-17  1:56 ` [PATCH v2 3/8] firmware: imx: scu-irq: Init workqueue before request mbox channel Peng Fan
2025-10-17  1:56 ` [PATCH v2 4/8] firmware: imx: scu-irq: Set mu_resource_id before get handle Peng Fan
2025-10-17  1:56 ` [PATCH v2 5/8] firmware: imx: scu-irq: Remove unused export of imx_scu_enable_general_irq_channel Peng Fan
2025-10-17  1:56 ` Peng Fan [this message]
2025-10-17  1:56 ` [PATCH v2 7/8] firmware: imx: scu: Suppress bind attrs Peng Fan
2025-10-17  1:56 ` [PATCH v2 8/8] firmware: imx: scu: Use devm_mutex_init Peng Fan
2025-10-27  6:44 ` [PATCH v2 0/8] firmware: imx: scu: Misc update Shawn Guo

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=20251017-imx-firmware-v2-6-b58f68ec2ea9@nxp.com \
    --to=peng.fan@nxp.com \
    --cc=aisheng.dong@nxp.com \
    --cc=festevam@gmail.com \
    --cc=frank.li@nxp.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /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®