diff mbox series

[141/141] Input: libps2 - Fix fall-through warnings for Clang

Message ID d2944854e3e118b837755abf4cbdb497662001b7.1605896060.git.gustavoars@kernel.org
State Accepted
Commit f7bda6662fd4f39113b4dee00f7ded44f846b7f4
Headers show
Series None | expand

Commit Message

Gustavo A. R. Silva Nov. 20, 2020, 6:41 p.m. UTC
In preparation to enable -Wimplicit-fallthrough for Clang, fix a
warning by replacing a /* Fall through */ comment with the new
pseudo-keyword macro fallthrough.

Notice that Clang doesn't recognize /* Fall through */ comments as
implicit fall-through markings.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
 drivers/input/serio/libps2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dmitry Torokhov Nov. 23, 2020, 6:16 a.m. UTC | #1
On Fri, Nov 20, 2020 at 12:41:12PM -0600, Gustavo A. R. Silva wrote:
> In preparation to enable -Wimplicit-fallthrough for Clang, fix a

> warning by replacing a /* Fall through */ comment with the new

> pseudo-keyword macro fallthrough.

> 

> Notice that Clang doesn't recognize /* Fall through */ comments as

> implicit fall-through markings.

> 

> Link: https://github.com/KSPP/linux/issues/115

> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>


Applied, thank you.

-- 
Dmitry
Gustavo A. R. Silva Nov. 24, 2020, 2:44 p.m. UTC | #2
On Sun, Nov 22, 2020 at 10:16:05PM -0800, Dmitry Torokhov wrote:
> On Fri, Nov 20, 2020 at 12:41:12PM -0600, Gustavo A. R. Silva wrote:

> > In preparation to enable -Wimplicit-fallthrough for Clang, fix a

> > warning by replacing a /* Fall through */ comment with the new

> > pseudo-keyword macro fallthrough.

> > 

> > Notice that Clang doesn't recognize /* Fall through */ comments as

> > implicit fall-through markings.

> > 

> > Link: https://github.com/KSPP/linux/issues/115

> > Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>

> 

> Applied, thank you.


Thank you, Dmitry.
--
Gustavo
diff mbox series

Patch

diff --git a/drivers/input/serio/libps2.c b/drivers/input/serio/libps2.c
index 8a16e41f7b7f..250e213cc80c 100644
--- a/drivers/input/serio/libps2.c
+++ b/drivers/input/serio/libps2.c
@@ -405,7 +405,7 @@  bool ps2_handle_ack(struct ps2dev *ps2dev, u8 data)
 			ps2dev->nak = PS2_RET_ERR;
 			break;
 		}
-		/* Fall through */
+		fallthrough;
 
 	/*
 	 * Workaround for mice which don't ACK the Get ID command.