]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
i3c: master: replace ENOTSUPP with SUSV4-compliant EOPNOTSUPP
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Sat, 28 Jun 2025 19:20:28 +0000 (21:20 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 7 Jul 2025 21:14:46 +0000 (23:14 +0200)
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"

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20250628192027.3932-6-wsa+renesas@sang-engineering.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/i3c/master.c

index dfa0bad991cf7279e876fb4899f4fba3f17d29bd..1a68acee1f13073409fcb5643d1535371ca3eb59 100644 (file)
@@ -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);
@@ -2768,7 +2768,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:
@@ -2795,7 +2795,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)
@@ -2956,7 +2956,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);
 }
@@ -3006,7 +3006,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;