• Gustavo A. R. Silva's avatar
    iio: mma8452: mark expected switch fall-through · cb57f2eb
    Gustavo A. R. Silva authored
    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: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
    Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
    cb57f2eb
mma8452.c 46.5 KB