From: Bart Van Assche Date: Mon, 6 Aug 2018 22:34:21 +0000 (-0700) Subject: lib/vsprintf: Do not handle %pO[^F] as %px X-Git-Tag: Ubuntu-4.15.0-56.62~2284 X-Git-Url: https://git.proxmox.com/?p=mirror_ubuntu-bionic-kernel.git;a=commitdiff_plain;h=f3e7a0d52683e93b852318989a3db3354aa20959 lib/vsprintf: Do not handle %pO[^F] as %px BugLink: https://bugs.launchpad.net/bugs/1835972 commit 554ec508653688c21d9b8024af73a1ffaa0164b9 upstream. 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 Cc: Pantelis Antoniou Cc: Joe Perches Cc: Rob Herring Cc: v4.15+ Signed-off-by: Bart Van Assche Signed-off-by: Petr Mladek Signed-off-by: Greg Kroah-Hartman Signed-off-by: Kamal Mostafa Signed-off-by: Kleber Sacilotto de Souza --- diff --git a/lib/vsprintf.c b/lib/vsprintf.c index cf9527513bde..6676da723f2a 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -1983,6 +1983,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); #ifdef CONFIG_KMSG_IDS