Skip to content

Commit

Permalink
i2c: i2c-nct6775: fix -Wimplicit-fallthrough
Browse files Browse the repository at this point in the history
Depending on a compiler, `case I2C_SMBUS_BYTE_DATA` can trigger
-Wimplicit-fallthrough / unannotated fallthrough as it doesn't
mention it anyhow.
Add a `fallthrough` attribute to silence this.

Fixes: 480fefb ("i2c: busses: Add SMBus capability to work with OpenRGB driver control")
Signed-off-by: Alexander Lobakin <alobakin@pm.me>
  • Loading branch information
solbjorn committed Oct 9, 2022
1 parent 3325905 commit e5787b8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/i2c/busses/i2c-nct6775.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ static s32 nct6775_access(struct i2c_adapter * adap, u16 addr,
break;
case I2C_SMBUS_BYTE_DATA:
tmp_data.byte = data->byte;
fallthrough;
case I2C_SMBUS_BYTE:
outb_p((addr << 1) | read_write,
SMBHSTADD);
Expand Down

0 comments on commit e5787b8

Please sign in to comment.