diff mbox series

i2c: gxp: remove "empty" switch statement

Message ID 20230217221330.27000-1-wsa@kernel.org
State New
Headers show
Series i2c: gxp: remove "empty" switch statement | expand

Commit Message

Wolfram Sang Feb. 17, 2023, 10:13 p.m. UTC
There used to be error messages which had to go. Now, it only consists
of 'break's, so it can go.

Signed-off-by: Wolfram Sang <wsa@kernel.org>
---
 drivers/i2c/busses/i2c-gxp.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

Comments

Wolfram Sang March 3, 2023, 7:59 p.m. UTC | #1
On Fri, Feb 17, 2023 at 11:13:30PM +0100, Wolfram Sang wrote:
> There used to be error messages which had to go. Now, it only consists
> of 'break's, so it can go.
> 
> Signed-off-by: Wolfram Sang <wsa@kernel.org>

Nick, I hope you don't mind that I apply this without your ack, I'd like
to have the driver proper with rc1 and time is running out. I'd think
the patch is trivial enough.

Applied to for-curent!
Hawkins, Nick March 3, 2023, 8:16 p.m. UTC | #2
> Nick, I hope you don't mind that I apply this without your ack, I'd like
> to have the driver proper with rc1 and time is running out. I'd think
> the patch is trivial enough.


> Applied to for-curent!

No worries! I did not even see this message come in.

Thanks,

-Nick Hawkins
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-gxp.c b/drivers/i2c/busses/i2c-gxp.c
index da4c8e5a8039..352dedf6292f 100644
--- a/drivers/i2c/busses/i2c-gxp.c
+++ b/drivers/i2c/busses/i2c-gxp.c
@@ -126,19 +126,8 @@  static int gxp_i2c_master_xfer(struct i2c_adapter *adapter,
 	time_left = wait_for_completion_timeout(&drvdata->completion,
 						adapter->timeout);
 	ret = num - drvdata->msgs_remaining;
-	if (time_left == 0) {
-		switch (drvdata->state) {
-		case GXP_I2C_WDATA_PHASE:
-			break;
-		case GXP_I2C_RDATA_PHASE:
-			break;
-		case GXP_I2C_ADDR_PHASE:
-			break;
-		default:
-			break;
-		}
+	if (time_left == 0)
 		return -ETIMEDOUT;
-	}
 
 	if (drvdata->state == GXP_I2C_ADDR_NACK ||
 	    drvdata->state == GXP_I2C_DATA_NACK)