OSDN Git Service

hwmon: Mark expected switch fall-throughs
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Mon, 2 Jul 2018 21:30:17 +0000 (16:30 -0500)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 9 Jul 2018 03:08:13 +0000 (20:08 -0700)
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>
drivers/hwmon/emc1403.c
drivers/hwmon/nct6775.c

index 1ea7ca5..aaebeb7 100644 (file)
@@ -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;
        }
index 3714990..c6bd61e 100644 (file)
@@ -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) |