Skip to contentSkip to conversation

Input: libps2 - Use fallthrough pseudo-keyword

PATCH New Gustavo A. R. Silva 1 participant 1 message Oct 8, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: libps2 - Use fallthrough pseudo-keyword

In order to enable -Wimplicit-fallthrough for Clang[1], replace the existing /* Fall through */ comment with the new pseudo-keyword macro fallthrough[2].

[1] https://git.kernel.org/linus/e2079e93f562c7f7a030eb7642017ee5eabaaa10
[2] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

---
 drivers/input/serio/libps2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/serio/libps2.c +1 -1
index 8a16e41f7b7f..250e213cc80c 100644
@@ -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.
Signature · 1 line
2.27.0