From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AF2B7A0487 for ; Mon, 29 Jul 2019 14:32:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 316901BF75; Mon, 29 Jul 2019 14:32:22 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id B07F11BF74; Mon, 29 Jul 2019 14:32:20 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jul 2019 05:32:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,322,1559545200"; d="scan'208";a="346585333" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.223.78]) by orsmga005.jf.intel.com with ESMTP; 29 Jul 2019 05:32:18 -0700 From: Ferruh Yigit To: dev@dpdk.org Cc: Thomas Monjalon , stable@dpdk.org Date: Mon, 29 Jul 2019 13:32:16 +0100 Message-Id: <20190729123216.64601-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] igb_uio: fix build on Linux 5.3 for implicit fall through X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" build error: .../dpdk/build/build/kernel/linux/igb_uio/igb_uio.c: In function ‘igbuio_pci_enable_interrupts’: .../dpdk/build/build/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, .... .../dpdk/build/build/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 --- kernel/linux/igb_uio/igb_uio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/linux/igb_uio/igb_uio.c b/kernel/linux/igb_uio/igb_uio.c index 3cf394bdf..039f5a5f6 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; -- 2.21.0