HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33334
Change subject: ec/kontron/kempld/kempld_i2c.c: Remove unneeded 'else' ......................................................................
ec/kontron/kempld/kempld_i2c.c: Remove unneeded 'else'
'else' is not needed after a 'break' or 'return'.
Change-Id: I0843bebe48e4b91fc76c440ae33bbca838621de9 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/ec/kontron/kempld/kempld_i2c.c 1 file changed, 2 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33334/1
diff --git a/src/ec/kontron/kempld/kempld_i2c.c b/src/ec/kontron/kempld/kempld_i2c.c index fdc0b50..ab41097 100644 --- a/src/ec/kontron/kempld/kempld_i2c.c +++ b/src/ec/kontron/kempld/kempld_i2c.c @@ -166,10 +166,9 @@ if (!(msg->flags & I2C_M_NOSTART)) { i2c->state = STATE_ADDR; return 0; - } else { - i2c->state = (msg->flags & I2C_M_RD) - ? STATE_READ : STATE_WRITE; } + i2c->state = (msg->flags & I2C_M_RD) + ? STATE_READ : STATE_WRITE; } else { i2c->state = STATE_DONE; kempld_write8(KEMPLD_I2C_CMD, I2C_CMD_STOP);
Vlado Cibic has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33334 )
Change subject: ec/kontron/kempld/kempld_i2c.c: Remove unneeded 'else' ......................................................................
Patch Set 1: Code-Review+1
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33334 )
Change subject: ec/kontron/kempld/kempld_i2c.c: Remove unneeded 'else' ......................................................................
Patch Set 1: Code-Review+2
Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/33334 )
Change subject: ec/kontron/kempld/kempld_i2c.c: Remove unneeded 'else' ......................................................................
ec/kontron/kempld/kempld_i2c.c: Remove unneeded 'else'
'else' is not needed after a 'break' or 'return'.
Change-Id: I0843bebe48e4b91fc76c440ae33bbca838621de9 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr Reviewed-on: https://review.coreboot.org/c/coreboot/+/33334 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Vlado Cibic Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/ec/kontron/kempld/kempld_i2c.c 1 file changed, 2 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved Vlado Cibic: Looks good to me, but someone else must approve
diff --git a/src/ec/kontron/kempld/kempld_i2c.c b/src/ec/kontron/kempld/kempld_i2c.c index fdc0b50..ab41097 100644 --- a/src/ec/kontron/kempld/kempld_i2c.c +++ b/src/ec/kontron/kempld/kempld_i2c.c @@ -166,10 +166,9 @@ if (!(msg->flags & I2C_M_NOSTART)) { i2c->state = STATE_ADDR; return 0; - } else { - i2c->state = (msg->flags & I2C_M_RD) - ? STATE_READ : STATE_WRITE; } + i2c->state = (msg->flags & I2C_M_RD) + ? STATE_READ : STATE_WRITE; } else { i2c->state = STATE_DONE; kempld_write8(KEMPLD_I2C_CMD, I2C_CMD_STOP);