projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7fb2fd4
)
/dev/mem: Mark expected switch fall-through
author
Gustavo A. R. Silva
<gustavo@embeddedor.com>
Mon, 2 Jul 2018 17:57:24 +0000
(12:57 -0500)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Sat, 7 Jul 2018 15:35:00 +0000
(17:35 +0200)
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>
drivers/char/mem.c
patch
|
blob
|
history
diff --git
a/drivers/char/mem.c
b/drivers/char/mem.c
index
ffeb60d
..
4b00d6a
100644
(file)
--- 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)
switch (orig) {
case SEEK_CUR:
offset += file->f_pos;
+ /* fall through */
case SEEK_SET:
/* to avoid userland mistaking f_pos=-9 as -EBADF=-9 */
if ((unsigned long long)offset >= -MAX_ERRNO) {