From: Frank Li <Frank.li@nxp.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-renesas-soc@vger.kernel.org,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
linux-i3c@lists.infradead.org
Subject: Re: [PATCH 1/3] i3c: core: switch to use SUSV4 error codes
Date: Wed, 25 Jun 2025 16:30:36 -0400 [thread overview]
Message-ID: <aFxcbGQyfjaHOHDt@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20250625130918.14507-6-wsa+renesas@sang-engineering.com>
On Wed, Jun 25, 2025 at 03:09:19PM +0200, Wolfram Sang wrote:
> This checkpatch warning makes sense here: "ENOTSUPP is not a SUSV4 error
> code, prefer EOPNOTSUPP" We don't have a userspace interface yet, but we
> probably will get one. So, let's convert these error codes now, before
> it will be forgotten in the future, and they could slip through to
> applications.
I suggest the simple words should be enough.
i3c: core: replace ENOTSUPP with SUSV4-compliant EOPNOTSUPP
Replace non-standard ENOTSUPP with the SUSV4-defined error code EOPNOTSUPP
to fix below checkpatch warning:
"ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP"
Frank
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
> drivers/i3c/master.c | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
> index e53c69d24873..354fef4a033c 100644
> --- a/drivers/i3c/master.c
> +++ b/drivers/i3c/master.c
> @@ -837,14 +837,14 @@ static int i3c_master_send_ccc_cmd_locked(struct i3c_master_controller *master,
> return -EINVAL;
>
> if (!master->ops->send_ccc_cmd)
> - return -ENOTSUPP;
> + return -EOPNOTSUPP;
>
> if ((cmd->id & I3C_CCC_DIRECT) && (!cmd->dests || !cmd->ndests))
> return -EINVAL;
>
> if (master->ops->supports_ccc_cmd &&
> !master->ops->supports_ccc_cmd(master, cmd))
> - return -ENOTSUPP;
> + return -EOPNOTSUPP;
>
> ret = master->ops->send_ccc_cmd(master, cmd);
> if (ret) {
> @@ -1439,7 +1439,7 @@ static int i3c_master_retrieve_dev_info(struct i3c_dev_desc *dev)
>
> if (dev->info.bcr & I3C_BCR_HDR_CAP) {
> ret = i3c_master_gethdrcap_locked(master, &dev->info);
> - if (ret && ret != -ENOTSUPP)
> + if (ret && ret != -EOPNOTSUPP)
> return ret;
> }
>
> @@ -2210,7 +2210,7 @@ of_i3c_master_add_i2c_boardinfo(struct i3c_master_controller *master,
> */
> if (boardinfo->base.flags & I2C_CLIENT_TEN) {
> dev_err(dev, "I2C device with 10 bit address not supported.");
> - return -ENOTSUPP;
> + return -EOPNOTSUPP;
> }
>
> /* LVR is encoded in reg[2]. */
> @@ -2340,13 +2340,13 @@ static int i3c_master_i2c_adapter_xfer(struct i2c_adapter *adap,
> return -EINVAL;
>
> if (!master->ops->i2c_xfers)
> - return -ENOTSUPP;
> + return -EOPNOTSUPP;
>
> /* Doing transfers to different devices is not supported. */
> addr = xfers[0].addr;
> for (i = 1; i < nxfers; i++) {
> if (addr != xfers[i].addr)
> - return -ENOTSUPP;
> + return -EOPNOTSUPP;
> }
>
> i3c_bus_normaluse_lock(&master->bus);
> @@ -2766,7 +2766,7 @@ static int i3c_master_check_ops(const struct i3c_master_controller_ops *ops)
> * controller)
> * @ops: the master controller operations
> * @secondary: true if you are registering a secondary master. Will return
> - * -ENOTSUPP if set to true since secondary masters are not yet
> + * -EOPNOTSUPP if set to true since secondary masters are not yet
> * supported
> *
> * This function takes care of everything for you:
> @@ -2793,7 +2793,7 @@ int i3c_master_register(struct i3c_master_controller *master,
>
> /* We do not support secondary masters yet. */
> if (secondary)
> - return -ENOTSUPP;
> + return -EOPNOTSUPP;
>
> ret = i3c_master_check_ops(ops);
> if (ret)
> @@ -2954,7 +2954,7 @@ int i3c_dev_do_priv_xfers_locked(struct i3c_dev_desc *dev,
> return -EINVAL;
>
> if (!master->ops->priv_xfers)
> - return -ENOTSUPP;
> + return -EOPNOTSUPP;
>
> return master->ops->priv_xfers(dev, xfers, nxfers);
> }
> @@ -3004,7 +3004,7 @@ int i3c_dev_request_ibi_locked(struct i3c_dev_desc *dev,
> int ret;
>
> if (!master->ops->request_ibi)
> - return -ENOTSUPP;
> + return -EOPNOTSUPP;
>
> if (dev->ibi)
> return -EBUSY;
> --
> 2.47.2
>
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
next prev parent reply other threads:[~2025-06-25 21:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-25 13:09 [PATCH 0/3] i3c: switch to use SUSV4 error codes Wolfram Sang
2025-06-25 13:09 ` [PATCH 1/3] i3c: core: " Wolfram Sang
2025-06-25 20:30 ` Frank Li [this message]
2025-06-26 9:11 ` Wolfram Sang
2025-06-26 16:00 ` Frank Li
2025-06-25 13:09 ` [PATCH 2/3] i3c: dw: " Wolfram Sang
2025-06-25 13:09 ` [PATCH 3/3] i3c: cdns: " Wolfram Sang
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=aFxcbGQyfjaHOHDt@lizhi-Precision-Tower-5810 \
--to=frank.li@nxp.com \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-i3c@lists.infradead.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=wsa+renesas@sang-engineering.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