]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
vfio: Mark expected switch fall-throughs
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Mon, 9 Jul 2018 22:53:09 +0000 (17:53 -0500)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 6 Aug 2018 18:22:54 +0000 (12:22 -0600)
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/pci/vfio_pci.c
drivers/vfio/vfio_iommu_type1.c

index 125b58eff9369618e9a40398e089d8a0bee8deae..7fe2748ba101efb5aa9bf5a59f1610256137917b 100644 (file)
@@ -789,7 +789,7 @@ static long vfio_pci_ioctl(void *device_data,
                case VFIO_PCI_ERR_IRQ_INDEX:
                        if (pci_is_pcie(vdev->pdev))
                                break;
-               /* pass thru to return error */
+               /* fall through */
                default:
                        return -EINVAL;
                }
index 3e5b17710a4f1fa47eb4f1333c17c96e1eae2cdd..d9fd3188615dc66267ba5ff715388f27356164b0 100644 (file)
@@ -1601,6 +1601,7 @@ static void *vfio_iommu_type1_open(unsigned long arg)
                break;
        case VFIO_TYPE1_NESTING_IOMMU:
                iommu->nesting = true;
+               /* fall through */
        case VFIO_TYPE1v2_IOMMU:
                iommu->v2 = true;
                break;