virt: vbox: Use fallthrough;
authorJoe Perches <joe@perches.com>
Thu, 12 Mar 2020 19:17:14 +0000 (12:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Mar 2020 06:41:03 +0000 (07:41 +0100)
Convert the various uses of fallthrough comments to fallthrough;

Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe@perches.com/
And by hand:

drivers/virt/vboxguest/vboxguest_core.c has a fallthrough comment outside
of an #ifdef block that causes gcc to emit a warning if converted in-place.

So move the new fallthrough; inside the containing #ifdef/#endif too.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/68773b4cd82288b78ca6fcde8c43e249a025378a.1584040050.git.joe@perches.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/virt/vboxguest/vboxguest_core.c
drivers/virt/vboxguest/vboxguest_utils.c

index d823d55..b690a8a 100644 (file)
@@ -1553,8 +1553,8 @@ int vbg_core_ioctl(struct vbg_session *session, unsigned int req, void *data)
 #ifdef CONFIG_COMPAT
        case VBG_IOCTL_HGCM_CALL_32(0):
                f32bit = true;
+               fallthrough;
 #endif
-               /* Fall through */
        case VBG_IOCTL_HGCM_CALL(0):
                return vbg_ioctl_hgcm_call(gdev, session, f32bit, data);
        case VBG_IOCTL_LOG(0):
index 50920b6..7396187 100644 (file)
@@ -311,7 +311,7 @@ static u32 hgcm_call_linear_addr_type_to_pagelist_flags(
        switch (type) {
        default:
                WARN_ON(1);
-               /* Fall through */
+               fallthrough;
        case VMMDEV_HGCM_PARM_TYPE_LINADDR:
        case VMMDEV_HGCM_PARM_TYPE_LINADDR_KERNEL:
                return VMMDEV_HGCM_F_PARM_DIRECTION_BOTH;