nvram: annotate implicit fall through
PATCH 1/1 nvram: annotate implicit fall through
There is a plan to build the kernel with -Wimplicit-fallthrough and this place in the code produced a warning (W=1).
This commit remove the following warning:
drivers/char/generic_nvram.c:83:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
--- drivers/char/generic_nvram.c | 1 + 1 file changed, 1 insertion(+)
drivers/char/generic_nvram.c +1 -0
@@ -81,6 +81,7 @@ static int nvram_ioctl(struct file *file, unsigned int cmd, unsigned long arg)#ifdef CONFIG_PPC_PMAC case OBSOLETE_PMAC_NVRAM_GET_OFFSET :printk (KERN_WARNING "nvram: Using obsolete PMAC_NVRAM_GET_OFFSET ioctl\n" ); +/* fall through */ case IOC_NVRAM_GET_OFFSET : {int part, offset;
Signature · 1 line
2.19.2
Quoted 17 lines · Mathieu Malaterre
There is a plan to build the kernel with -Wimplicit-fallthrough and this place in the code produced a warning (W=1).
This commit remove the following warning:
drivers/char/generic_nvram.c:83:3: warning: this statement may fall through [-Wimplicit-fallthrough=]Signed-off-by Mathieu Malaterre <[email protected]>--- drivers/char/generic_nvram.c | 1 + 1 file changed, 1 insertion(+)drivers/char/generic_nvram.c +0
-0
drivers/char/generic_nvram.c static int nvram_ioctl(struct file *file, unsigned int cmd, unsigned long arg) · line 83
Quoted 3 lines
drivers/char/generic_nvram.c +0
-0@@ -81,6 +81,7 @@ static int nvram_ioctl(struct file *file, unsigned int cmd, unsigned long arg)#ifdef CONFIG_PPC_PMAC case OBSOLETE_PMAC_NVRAM_GET_OFFSET :printk (KERN_WARNING "nvram: Using obsolete PMAC_NVRAM_GET_OFFSET ioctl\n" );
Here you could use the pr_warn() macro instead of the obsolete printk KERN_WARNING, but that'd be another patch.
Anyway:
Thanks
--
Gustavo
Quoted 5 lines
drivers/char/generic_nvram.c +1
-0+/* fall through */ case IOC_NVRAM_GET_OFFSET : {int part, offset;
Greg Kroah-Hartman
maintainerQuoted 18 lines · Mathieu Malaterre
There is a plan to build the kernel with -Wimplicit-fallthrough and this place in the code produced a warning (W=1).
This commit remove the following warning:
drivers/char/generic_nvram.c:83:3: warning: this statement may fall through [-Wimplicit-fallthrough=]Signed-off-by Mathieu Malaterre <[email protected]>--- drivers/char/generic_nvram.c | 1 + 1 file changed, 1 insertion(+)drivers/char/generic_nvram.c +0
-0
drivers/char/generic_nvram.c static int nvram_ioctl(struct file *file, unsigned int cmd, unsigned long arg) · line 87
Quoted 7 lines
drivers/char/generic_nvram.c +1
-0@@ -81,6 +81,7 @@ static int nvram_ioctl(struct file *file, unsigned int cmd, unsigned long arg)#ifdef CONFIG_PPC_PMAC case OBSOLETE_PMAC_NVRAM_GET_OFFSET :printk (KERN_WARNING "nvram: Using obsolete PMAC_NVRAM_GET_OFFSET ioctl\n" ); +/* fall through */ case IOC_NVRAM_GET_OFFSET : {int part, offset;
This file is now gone from my tree, sorry.
greg k-h