summaryrefslogtreecommitdiffstats
path: root/drivers/iio/accel
diff options
context:
space:
mode:
authorGustavo A. R. Silva2019-02-11 23:23:18 +0100
committerJonathan Cameron2019-04-04 21:19:41 +0200
commitcb57f2eb0156829f61dd946d96b1270ea7535b76 (patch)
tree4b419009d4352c590a1142650aa218aa32fe0a18 /drivers/iio/accel
parentdt-bindings: iio: chemical: pms7003: extend supported sensors list (diff)
downloadkernel-qcow2-linux-cb57f2eb0156829f61dd946d96b1270ea7535b76.tar.gz
kernel-qcow2-linux-cb57f2eb0156829f61dd946d96b1270ea7535b76.tar.xz
kernel-qcow2-linux-cb57f2eb0156829f61dd946d96b1270ea7535b76.zip
iio: mma8452: mark expected switch fall-through
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/iio/accel/mma8452.c: In function ‘mma8452_probe’: drivers/iio/accel/mma8452.c:1581:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (ret == data->chip_info->chip_id) ^ drivers/iio/accel/mma8452.c:1584:2: note: here default: ^~~~~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find. This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/accel')
-rw-r--r--drivers/iio/accel/mma8452.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
index 302781126bc6..00e100fc845a 100644
--- a/drivers/iio/accel/mma8452.c
+++ b/drivers/iio/accel/mma8452.c
@@ -1580,7 +1580,7 @@ static int mma8452_probe(struct i2c_client *client,
case FXLS8471_DEVICE_ID:
if (ret == data->chip_info->chip_id)
break;
- /* else: fall through */
+ /* fall through */
default:
ret = -ENODEV;
goto disable_regulators;