From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 20009A00C3 for ; Wed, 15 Dec 2021 20:00:20 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 10B3F40041; Wed, 15 Dec 2021 20:00:20 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id A1EE940041 for ; Wed, 15 Dec 2021 20:00:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1639594818; x=1671130818; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=oKIegVbakSOBLBwNWb1jgAcBeBdNtFfpKd+IsDDnWX0=; b=SS7mZSuJKKJhrBw/pzU7RjyxTp1eNNBQmnr2kgYlOBitdglCl9e9yZ1J ZYdELJAZTWbsD4MK3Kha2pvpnorDkbKTlZRbRWIbmYBL1LlA4NGyx1/gr 7cKmA8wD/GQ7YAMS1K7nnvLKAi1QW48OyrxfpmTw7zq53lPlX/aY7JIWG cCppxtBeUHGm/ZzUMxz6Ye/XRbaqFjU+CLnMDgArI7yjC7GSbP7XPp+ac fzrkWeIJry+jpnk5MnHjUzaKZGC+z8uWVEbT1Yk2JaaC2oz3Slbw8x7BD f8C0zv6THlRYUSRhSN48KpD+Vj+sNpH24ldOSepnQRnw+sD5rQMtW9/+C g==; X-IronPort-AV: E=McAfee;i="6200,9189,10199"; a="302685429" X-IronPort-AV: E=Sophos;i="5.88,207,1635231600"; d="scan'208";a="302685429" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Dec 2021 11:00:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,207,1635231600"; d="scan'208";a="662035351" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.27]) by fmsmga001.fm.intel.com with ESMTP; 15 Dec 2021 11:00:16 -0800 From: Ferruh Yigit To: stable@dpdk.org Cc: Christian Ehrhardt Subject: [PATCH 19.11] igb_uio: fix build for switch fall through Date: Wed, 15 Dec 2021 19:00:11 +0000 Message-Id: <20211215190011.1928990-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Linux is using '-Wimplicit-fallthrough=5' compiler option, which doesn't take any fall through comments into account but only uses compiler 'fallthrough' attribute to document fall through action is intended. "falls through" comment was used in the code which is causing a build error now, this patch converts comment to the 'fallthrough' macro defined in the Linux. To cover the case where Linux version doesn't have the macro, defined it in the compatibility header too. Signed-off-by: Ferruh Yigit --- Cc: Christian Ehrhardt --- kernel/linux/igb_uio/compat.h | 4 ++++ kernel/linux/igb_uio/igb_uio.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/kernel/linux/igb_uio/compat.h b/kernel/linux/igb_uio/compat.h index 8dbb896ae118..04ff7f60031f 100644 --- a/kernel/linux/igb_uio/compat.h +++ b/kernel/linux/igb_uio/compat.h @@ -152,3 +152,7 @@ static inline bool igbuio_kernel_is_locked_down(void) return false; #endif } + +#ifndef fallthrough +#define fallthrough do {} while (0) /* fallthrough */ +#endif diff --git a/kernel/linux/igb_uio/igb_uio.c b/kernel/linux/igb_uio/igb_uio.c index 039f5a5f6354..57d0c58ab1b8 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 - /* falls through - to MSI */ + fallthrough; 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 - /* falls through - to INTX */ + fallthrough; 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"); - /* falls through - to no IRQ */ + fallthrough; case RTE_INTR_MODE_NONE: udev->mode = RTE_INTR_MODE_NONE; udev->info.irq = UIO_IRQ_NONE; -- 2.33.1