From: Ferruh Yigit Date: Mon, 29 Jul 2019 12:32:16 +0000 (+0100) Subject: igb_uio: fix build on Linux 5.3 for fall through X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c96bbbd010f7abb88c2ca2ed9dfc5ecd37e9027d;p=dpdk.git igb_uio: fix build on Linux 5.3 for fall through build error: kernel/linux/igb_uio/igb_uio.c: In function ‘igbuio_pci_enable_interrupts’: kernel/linux/igb_uio/igb_uio.c:230:6: error: this statement may fall through [-Werror=implicit-fallthrough=] 230 | if (pci_alloc_irq_vectors(udev->pdev, 1, 1, .... kernel/linux/igb_uio/igb_uio.c:240:2: note: here 240 | case RTE_INTR_MODE_MSI: | ^~~~ The build error is caused by Linux kernel commit in 5.3 that enables the "-Wimplicit-fallthrough=3" gcc flag. Commit a035d552a93b ("Makefile: Globally enable fall-through warning") To fix the error, either a gcc attribute can be provided [1] or a code comment with some defined syntax need to be provided [2], since there is already comments, updated them slightly to match the required syntax to fix the build error. [1] "__attribute__ ((fallthrough));" [2] [ \t.!]*([Ee]lse,? |[Ii]ntentional(ly)? )? fall(s | |-)?thr(ough|u)[ \t.!]*(-[^\n\r]*)? Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit --- diff --git a/kernel/linux/igb_uio/igb_uio.c b/kernel/linux/igb_uio/igb_uio.c index 3cf394bdf7..039f5a5f63 100644 --- a/kernel/linux/igb_uio/igb_uio.c +++ b/kernel/linux/igb_uio/igb_uio.c @@ -236,7 +236,7 @@ igbuio_pci_enable_interrupts(struct rte_uio_pci_dev *udev) } #endif - /* fall back to MSI */ + /* falls through - to MSI */ case RTE_INTR_MODE_MSI: #ifndef HAVE_ALLOC_IRQ_VECTORS if (pci_enable_msi(udev->pdev) == 0) { @@ -255,7 +255,7 @@ igbuio_pci_enable_interrupts(struct rte_uio_pci_dev *udev) break; } #endif - /* fall back to INTX */ + /* falls through - to INTX */ case RTE_INTR_MODE_LEGACY: if (pci_intx_mask_supported(udev->pdev)) { dev_dbg(&udev->pdev->dev, "using INTX"); @@ -265,7 +265,7 @@ igbuio_pci_enable_interrupts(struct rte_uio_pci_dev *udev) break; } dev_notice(&udev->pdev->dev, "PCI INTX mask not supported\n"); - /* fall back to no IRQ */ + /* falls through - to no IRQ */ case RTE_INTR_MODE_NONE: udev->mode = RTE_INTR_MODE_NONE; udev->info.irq = UIO_IRQ_NONE;