iio: mma8452: mark expected switch fall-through
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Mon, 11 Feb 2019 22:23:18 +0000 (16:23 -0600)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 4 Apr 2019 19:19:41 +0000 (20:19 +0100)
commitcb57f2eb0156829f61dd946d96b1270ea7535b76
tree4b419009d4352c590a1142650aa218aa32fe0a18
parentfaad0af1623c5dd214aa3207ba43186ee37c685d
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>
drivers/iio/accel/mma8452.c