linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: gxp: remove "empty" switch statement
@ 2023-02-17 22:13 Wolfram Sang
  2023-03-03 19:59 ` Wolfram Sang
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfram Sang @ 2023-02-17 22:13 UTC (permalink / raw)
  To: linux-i2c; +Cc: nick.hawkins, Wolfram Sang

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(-)

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)
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] i2c: gxp: remove "empty" switch statement
  2023-02-17 22:13 [PATCH] i2c: gxp: remove "empty" switch statement Wolfram Sang
@ 2023-03-03 19:59 ` Wolfram Sang
  2023-03-03 20:16   ` Hawkins, Nick
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfram Sang @ 2023-03-03 19:59 UTC (permalink / raw)
  To: linux-i2c; +Cc: nick.hawkins

[-- Attachment #1: Type: text/plain, Size: 424 bytes --]

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!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] i2c: gxp: remove "empty" switch statement
  2023-03-03 19:59 ` Wolfram Sang
@ 2023-03-03 20:16   ` Hawkins, Nick
  0 siblings, 0 replies; 3+ messages in thread
From: Hawkins, Nick @ 2023-03-03 20:16 UTC (permalink / raw)
  To: Wolfram Sang, linux-i2c@vger.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!

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

Thanks,

-Nick Hawkins




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-03 20:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-17 22:13 [PATCH] i2c: gxp: remove "empty" switch statement Wolfram Sang
2023-03-03 19:59 ` Wolfram Sang
2023-03-03 20:16   ` Hawkins, Nick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).