Skip to content

Commit

Permalink
hwmon: Mark expected switch fall-throughs
Browse files Browse the repository at this point in the history
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Gustavo A. R. Silva authored and Guenter Roeck committed Jul 9, 2018
1 parent 57fec3a commit ffb3243
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions drivers/hwmon/emc1403.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,10 @@ static int emc1403_probe(struct i2c_client *client,
switch (id->driver_data) {
case emc1404:
data->groups[2] = &emc1404_group;
/* fall through */
case emc1403:
data->groups[1] = &emc1403_group;
/* fall through */
case emc1402:
data->groups[0] = &emc1402_group;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/hwmon/nct6775.c
Original file line number Diff line number Diff line change
Expand Up @@ -2541,7 +2541,7 @@ static void pwm_update_registers(struct nct6775_data *data, int nr)
case thermal_cruise:
nct6775_write_value(data, data->REG_TARGET[nr],
data->target_temp[nr]);
/* intentional */
/* fall through */
default:
reg = nct6775_read_value(data, data->REG_FAN_MODE[nr]);
reg = (reg & ~data->tolerance_mask) |
Expand Down

0 comments on commit ffb3243

Please sign in to comment.