]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
i3c: master: dw: remove dead code from dw_i3c_master_*_xfers()
authorVitor Soares <vitor.soares@synopsys.com>
Wed, 27 Mar 2019 21:49:19 +0000 (22:49 +0100)
committerBoris Brezillon <boris.brezillon@collabora.com>
Sat, 30 Mar 2019 07:41:44 +0000 (08:41 +0100)
Detected by CoverityScan (Event result_independent_of_operands):
"(i3c_xfers + i).len > 65536" is always false regardless of the values
of its operands. This occurs as the logical operand of "if"

"(i2c_xfers + i).len > 65536" is always false regardless of the values
of its operands. This occurs as the logical operand of "if"

Signed-off-by: Vitor Soares <vitor.soares@synopsys.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
drivers/i3c/master/dw-i3c-master.c

index 59279224e07fcefa460b1939212a5009eb8a3681..e5a288069febc12a5ab0d98c6ff45f3789ef8c45 100644 (file)
@@ -840,11 +840,6 @@ static int dw_i3c_master_priv_xfers(struct i3c_dev_desc *dev,
        if (i3c_nxfers > master->caps.cmdfifodepth)
                return -ENOTSUPP;
 
-       for (i = 0; i < i3c_nxfers; i++) {
-               if (i3c_xfers[i].len > COMMAND_PORT_ARG_DATA_LEN_MAX)
-                       return -ENOTSUPP;
-       }
-
        for (i = 0; i < i3c_nxfers; i++) {
                if (i3c_xfers[i].rnw)
                        nrxwords += DIV_ROUND_UP(i3c_xfers[i].len, 4);
@@ -973,11 +968,6 @@ static int dw_i3c_master_i2c_xfers(struct i2c_dev_desc *dev,
        if (i2c_nxfers > master->caps.cmdfifodepth)
                return -ENOTSUPP;
 
-       for (i = 0; i < i2c_nxfers; i++) {
-               if (i2c_xfers[i].len > COMMAND_PORT_ARG_DATA_LEN_MAX)
-                       return -ENOTSUPP;
-       }
-
        for (i = 0; i < i2c_nxfers; i++) {
                if (i2c_xfers[i].flags & I2C_M_RD)
                        nrxwords += DIV_ROUND_UP(i2c_xfers[i].len, 4);