Better fallthrough annotation macro.

This commit is contained in:
Jasmine Iwanek
2023-08-09 19:44:56 -04:00
parent 2c5240e07f
commit 81bb5e564b
50 changed files with 94 additions and 239 deletions

View File

@@ -195,10 +195,7 @@ smbus_piix4_write(uint16_t addr, uint8_t val, void *priv)
i2c_write(i2c_smbus, smbus_addr, dev->cmd);
timer_bytes++;
}
#ifdef FALLTHROUGH_ANNOTATION
[[fallthrough]];
#endif
fallthrough;
case 0xc: /* I2C process call */
if (!read) { /* word write (only when writing) */
@@ -216,10 +213,7 @@ smbus_piix4_write(uint16_t addr, uint8_t val, void *priv)
case 0x5: /* block R/W */
timer_bytes++; /* count the SMBus length byte now */
#ifdef FALLTHROUGH_ANNOTATION
[[fallthrough]];
#endif
fallthrough;
case 0xd: /* I2C block R/W */
i2c_write(i2c_smbus, smbus_addr, dev->cmd);
@@ -251,10 +245,7 @@ smbus_piix4_write(uint16_t addr, uint8_t val, void *priv)
/* command write */
i2c_write(i2c_smbus, smbus_addr, dev->cmd);
timer_bytes++;
#ifdef FALLTHROUGH_ANNOTATION
[[fallthrough]];
#endif
fallthrough;
case 0xe: /* I2C with 7-bit address */
if (!read) { /* word write (only when writing) */