lib/vsprintf: Do not handle %pO[^F] as %px
authorBart Van Assche <bart.vanassche@wdc.com>
Mon, 6 Aug 2018 22:34:21 +0000 (15:34 -0700)
committerPetr Mladek <pmladek@suse.com>
Tue, 7 Aug 2018 07:20:18 +0000 (09:20 +0200)
This patch avoids that gcc reports the following when building with W=1:

lib/vsprintf.c:1941:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
   switch (fmt[1]) {
   ^~~~~~

Fixes: 7b1924a1d930eb2 ("vsprintf: add printk specifier %px")
Link: http://lkml.kernel.org/r/20180806223421.11995-1-bart.vanassche@wdc.com
Cc: linux-kernel@vger.kernel.org
Cc: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Joe Perches <joe@perches.com>
Cc: Rob Herring <robh@kernel.org>
Cc: v4.15+ <stable@vger.kernel.org>
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
lib/vsprintf.c

index a48aaa7..cda1862 100644 (file)
@@ -1942,6 +1942,7 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
                case 'F':
                        return device_node_string(buf, end, ptr, spec, fmt + 1);
                }
+               break;
        case 'x':
                return pointer_string(buf, end, ptr, spec);
        }