Skip to content

Commit d10a4c3

Browse files
Wolfram Sangalexandrebelloni
authored andcommitted
i3c: master: 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" Signed-off-by: Wolfram Sang <[email protected]> Reviewed-by: Frank Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 447270c commit d10a4c3

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

drivers/i3c/master.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -837,14 +837,14 @@ static int i3c_master_send_ccc_cmd_locked(struct i3c_master_controller *master,
837837
return -EINVAL;
838838

839839
if (!master->ops->send_ccc_cmd)
840-
return -ENOTSUPP;
840+
return -EOPNOTSUPP;
841841

842842
if ((cmd->id & I3C_CCC_DIRECT) && (!cmd->dests || !cmd->ndests))
843843
return -EINVAL;
844844

845845
if (master->ops->supports_ccc_cmd &&
846846
!master->ops->supports_ccc_cmd(master, cmd))
847-
return -ENOTSUPP;
847+
return -EOPNOTSUPP;
848848

849849
ret = master->ops->send_ccc_cmd(master, cmd);
850850
if (ret) {
@@ -1439,7 +1439,7 @@ static int i3c_master_retrieve_dev_info(struct i3c_dev_desc *dev)
14391439

14401440
if (dev->info.bcr & I3C_BCR_HDR_CAP) {
14411441
ret = i3c_master_gethdrcap_locked(master, &dev->info);
1442-
if (ret && ret != -ENOTSUPP)
1442+
if (ret && ret != -EOPNOTSUPP)
14431443
return ret;
14441444
}
14451445

@@ -2210,7 +2210,7 @@ of_i3c_master_add_i2c_boardinfo(struct i3c_master_controller *master,
22102210
*/
22112211
if (boardinfo->base.flags & I2C_CLIENT_TEN) {
22122212
dev_err(dev, "I2C device with 10 bit address not supported.");
2213-
return -ENOTSUPP;
2213+
return -EOPNOTSUPP;
22142214
}
22152215

22162216
/* LVR is encoded in reg[2]. */
@@ -2340,13 +2340,13 @@ static int i3c_master_i2c_adapter_xfer(struct i2c_adapter *adap,
23402340
return -EINVAL;
23412341

23422342
if (!master->ops->i2c_xfers)
2343-
return -ENOTSUPP;
2343+
return -EOPNOTSUPP;
23442344

23452345
/* Doing transfers to different devices is not supported. */
23462346
addr = xfers[0].addr;
23472347
for (i = 1; i < nxfers; i++) {
23482348
if (addr != xfers[i].addr)
2349-
return -ENOTSUPP;
2349+
return -EOPNOTSUPP;
23502350
}
23512351

23522352
i3c_bus_normaluse_lock(&master->bus);
@@ -2768,7 +2768,7 @@ static int i3c_master_check_ops(const struct i3c_master_controller_ops *ops)
27682768
* controller)
27692769
* @ops: the master controller operations
27702770
* @secondary: true if you are registering a secondary master. Will return
2771-
* -ENOTSUPP if set to true since secondary masters are not yet
2771+
* -EOPNOTSUPP if set to true since secondary masters are not yet
27722772
* supported
27732773
*
27742774
* This function takes care of everything for you:
@@ -2795,7 +2795,7 @@ int i3c_master_register(struct i3c_master_controller *master,
27952795

27962796
/* We do not support secondary masters yet. */
27972797
if (secondary)
2798-
return -ENOTSUPP;
2798+
return -EOPNOTSUPP;
27992799

28002800
ret = i3c_master_check_ops(ops);
28012801
if (ret)
@@ -2956,7 +2956,7 @@ int i3c_dev_do_priv_xfers_locked(struct i3c_dev_desc *dev,
29562956
return -EINVAL;
29572957

29582958
if (!master->ops->priv_xfers)
2959-
return -ENOTSUPP;
2959+
return -EOPNOTSUPP;
29602960

29612961
return master->ops->priv_xfers(dev, xfers, nxfers);
29622962
}
@@ -3006,7 +3006,7 @@ int i3c_dev_request_ibi_locked(struct i3c_dev_desc *dev,
30063006
int ret;
30073007

30083008
if (!master->ops->request_ibi)
3009-
return -ENOTSUPP;
3009+
return -EOPNOTSUPP;
30103010

30113011
if (dev->ibi)
30123012
return -EBUSY;

0 commit comments

Comments
 (0)