diff options
author | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2018-07-02 13:57:24 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-07 11:35:00 -0400 |
commit | 5faecb0162883df2b06965c7e6dd7c42278f7e0d (patch) | |
tree | bf9cb867f219f4b174f6e6b918f4ba82a058ea90 | |
parent | 7fb2fd4e25fc1fb10dcb30b5519de257cfeae84c (diff) |
/dev/mem: Mark expected switch fall-through
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/char/mem.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/char/mem.c b/drivers/char/mem.c index ffeb60d3434c..4b00d6adcccf 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c | |||
@@ -765,6 +765,7 @@ static loff_t memory_lseek(struct file *file, loff_t offset, int orig) | |||
765 | switch (orig) { | 765 | switch (orig) { |
766 | case SEEK_CUR: | 766 | case SEEK_CUR: |
767 | offset += file->f_pos; | 767 | offset += file->f_pos; |
768 | /* fall through */ | ||
768 | case SEEK_SET: | 769 | case SEEK_SET: |
769 | /* to avoid userland mistaking f_pos=-9 as -EBADF=-9 */ | 770 | /* to avoid userland mistaking f_pos=-9 as -EBADF=-9 */ |
770 | if ((unsigned long long)offset >= -MAX_ERRNO) { | 771 | if ((unsigned long long)offset >= -MAX_ERRNO) { |