[PATCH 2/2] eeprom: at25: add explicit fallthrough
Jules Maselbas
jmaselbas at zdiv.net
Fri Mar 14 03:45:02 PDT 2025
Signed-off-by: Jules Maselbas <jmaselbas at zdiv.net>
---
drivers/eeprom/at25.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/eeprom/at25.c b/drivers/eeprom/at25.c
index 43e72677c9..f58e554616 100644
--- a/drivers/eeprom/at25.c
+++ b/drivers/eeprom/at25.c
@@ -87,8 +87,10 @@ static ssize_t at25_ee_read(struct cdev *cdev,
switch (at25->addrlen) {
default: /* case 3 */
*cp++ = offset >> 16;
+ fallthrough;
case 2:
*cp++ = offset >> 8;
+ fallthrough;
case 1:
case 0: /* can't happen: for better codegen */
*cp++ = offset >> 0;
@@ -168,8 +170,10 @@ static ssize_t at25_ee_write(struct cdev *cdev,
switch (at25->addrlen) {
default: /* case 3 */
*cp++ = offset >> 16;
+ fallthrough;
case 2:
*cp++ = offset >> 8;
+ fallthrough;
case 1:
case 0: /* can't happen: for better codegen */
*cp++ = offset >> 0;
--
2.48.1
More information about the barebox
mailing list