video: fbdev: fsl-diu-fb: mark expected switch fall-throughs
Subsystems (2)
PATCH 1/1 video: fbdev: fsl-diu-fb: mark expected switch fall-throughs
Mark switch cases where we are expecting to fall through.
Fix the following warnings (Building: mpc512x_defconfig powerpc):
drivers/video/fbdev/fsl-diu-fb.c: In function ‘fsl_diu_ioctl’:./include/linux/device.h:1750:2: warning: this statement may fall through [-Wimplicit-fallthrough=]
_dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~drivers/video/fbdev/fsl-diu-fb.c:1287:3: note: in expansion of macro ‘dev_warn’
dev_warn(info->dev,
^~~~~~~~drivers/video/fbdev/fsl-diu-fb.c:1290:2: note: here
case MFB_SET_PIXFMT:
^~~~
In file included from ./include/linux/acpi.h:15:0,
from ./include/linux/i2c.h:13,
from ./include/uapi/linux/fb.h:6,
from ./include/linux/fb.h:6,
from drivers/video/fbdev/fsl-diu-fb.c:20:./include/linux/device.h:1750:2: warning: this statement may fall through [-Wimplicit-fallthrough=]
_dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~drivers/video/fbdev/fsl-diu-fb.c:1296:3: note: in expansion of macro ‘dev_warn’
dev_warn(info->dev,
^~~~~~~~drivers/video/fbdev/fsl-diu-fb.c:1299:2: note: here
case MFB_GET_PIXFMT:
^~~~
--- drivers/video/fbdev/fsl-diu-fb.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/video/fbdev/fsl-diu-fb.c +2 -0
@@ -1287,6 +1287,7 @@ static int fsl_diu_ioctl(struct fb_info *info, unsigned int cmd,dev_warn (info->dev,"MFB_SET_PIXFMT value of 0x%08x is deprecated.\n" ,MFB_SET_PIXFMT_OLD ); +/* fall through */ case MFB_SET_PIXFMT :if (copy_from_user (&pix_fmt, buf,sizeof (pix_fmt)))return -EFAULT ;
@@ -1296,6 +1297,7 @@ static int fsl_diu_ioctl(struct fb_info *info, unsigned int cmd,dev_warn (info->dev,"MFB_GET_PIXFMT value of 0x%08x is deprecated.\n" ,MFB_GET_PIXFMT_OLD ); +/* fall through */ case MFB_GET_PIXFMT : pix_fmt = ad->pix_fmt;if (copy_to_user (buf, &pix_fmt,sizeof (pix_fmt)))
Signature · 6 lines
2.23.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 29 lines · Gustavo A. R. Silva
Mark switch cases where we are expecting to fall through.
Fix the following warnings (Building:
mpc512x_defconfigpowerpc):
drivers/video/fbdev/fsl-diu-fb.c: In function ‘fsl_diu_ioctl’:./include/linux/device.h:1750:2: warning: this statement may fall through [-Wimplicit-fallthrough=]
_dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__)^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~drivers/video/fbdev/fsl-diu-fb.c:1287:3: note: in expansion of macro ‘dev_warn’
dev_warn(info->dev,
^~~~~~~~drivers/video/fbdev/fsl-diu-fb.c:1290:2: note: here
caseMFB_SET_PIXFMT:
^~~~
In file included from./include/linux/acpi.h:15:0,from ./include/linux/i2c.h:13, from ./include/uapi/linux/fb.h:6, from ./include/linux/fb.h:6, from drivers/video/fbdev/fsl-diu-fb.c:20:
./include/linux/device.h:1750:2: warning: this statement may fall through [-Wimplicit-fallthrough=]
_dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__)^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~drivers/video/fbdev/fsl-diu-fb.c:1296:3: note: in expansion of macro ‘dev_warn’
dev_warn(info->dev,
^~~~~~~~drivers/video/fbdev/fsl-diu-fb.c:1299:2: note: here
caseMFB_GET_PIXFMT:
^~~~
Quoted 2 lines
Reported-by kbuild test robot <[email protected]>Signed-off-by Gustavo A. R. Silva <[email protected]>
Thanks, patch queued for v5.6 (also sorry for the delay).
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Quoted 25 lines
--- drivers/video/fbdev/fsl-diu-fb.c | 2 ++ 1 file changed, 2 insertions(+)drivers/video/fbdev/fsl-diu-fb.c +2
-0@@ -1287,6 +1287,7 @@ static int fsl_diu_ioctl(struct fb_info *info, unsigned int cmd,dev_warn (info->dev,"MFB_SET_PIXFMT value of 0x%08x is deprecated.\n" ,MFB_SET_PIXFMT_OLD ); +/* fall through */ case MFB_SET_PIXFMT :if (copy_from_user (&pix_fmt, buf,sizeof (pix_fmt)))return -EFAULT ;@@ -1296,6 +1297,7 @@ static int fsl_diu_ioctl(struct fb_info *info, unsigned int cmd,dev_warn (info->dev,"MFB_GET_PIXFMT value of 0x%08x is deprecated.\n" ,MFB_GET_PIXFMT_OLD ); +/* fall through */ case MFB_GET_PIXFMT : pix_fmt = ad->pix_fmt;if (copy_to_user (buf, &pix_fmt,sizeof (pix_fmt)))