Sfoglia il codice sorgente

iio: mma8452: Mark expected switch fall-through

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Warning level 2 was used in this case: -Wimplicit-fallthrough=2

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Gustavo A. R. Silva 7 anni fa
parent
commit
e161ef7c3c
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      drivers/iio/accel/mma8452.c

+ 1 - 0
drivers/iio/accel/mma8452.c

@@ -1547,6 +1547,7 @@ static int mma8452_probe(struct i2c_client *client,
 	case FXLS8471_DEVICE_ID:
 	case FXLS8471_DEVICE_ID:
 		if (ret == data->chip_info->chip_id)
 		if (ret == data->chip_info->chip_id)
 			break;
 			break;
+		/* else: fall through */
 	default:
 	default:
 		return -ENODEV;
 		return -ENODEV;
 	}
 	}