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 119E3429FF; Wed, 26 Apr 2023 09:20:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 95941410FA; Wed, 26 Apr 2023 09:20:02 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id BB2E9410DC for ; Wed, 26 Apr 2023 09:20:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682493600; x=1714029600; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6rsuXNaAA7nR26/n8IvsrbVRv4pIR2dl/A2wNeeYYQ8=; b=mmVj+MsEme7IcVSaojHXdIVVklEt3fnCDSNh7ehNhb+xbxYc6rYHTPOT 06hC6ALXrZwyZa3D91cHLuc4C8Omuj7JTr5JYIiEWZJ4MPSokUg3fTblM 7mI1VpZkkKKJfJDFYI8aWi2NpCvKBcNBWw7FvC3aQDqDYMkcl+NcM0bTW GHiam6dVb1gVVzEO7VIQ2sz3lvW8oELgB8WxW25RMto8wBYSV91wN2x7z y9dUxoBaZYQGTrrcJ9cKhXbm+vTCuvgPFR35ZXop/5YwaArmYPk2LaVi2 EuYqqMbsktXK+AYjsGKpiIgFWaz2Hzz66o9DwO5U4FMRmwNHLSNMENJ5j A==; X-IronPort-AV: E=McAfee;i="6600,9927,10691"; a="335931462" X-IronPort-AV: E=Sophos;i="5.99,227,1677571200"; d="scan'208";a="335931462" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2023 00:19:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10691"; a="1023490233" X-IronPort-AV: E=Sophos;i="5.99,227,1677571200"; d="scan'208";a="1023490233" Received: from dpdk-qzhan15-test02.sh.intel.com ([10.67.115.37]) by fmsmga005.fm.intel.com with ESMTP; 26 Apr 2023 00:19:58 -0700 From: Qi Zhang To: beilei.xing@intel.com Cc: dev@dpdk.org, Qi Zhang Subject: [PATCH v2] common/idpf: remove unnecessary compile option Date: Wed, 26 Apr 2023 11:38:55 -0400 Message-Id: <20230426153855.1168782-1-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230424224700.997910-1-qi.z.zhang@intel.com> References: <20230424224700.997910-1-qi.z.zhang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Remove compile option "__KERNEL" which should not be considered in DPDK. Also only #include in idpf_osdep.h. Signed-off-by: Qi Zhang --- v2: - add fallthrough comment back drivers/common/idpf/base/idpf_controlq.c | 4 ---- drivers/common/idpf/base/idpf_controlq.h | 8 -------- drivers/common/idpf/base/idpf_controlq_api.h | 6 ------ drivers/common/idpf/base/idpf_lan_txrx.h | 3 +-- drivers/common/idpf/base/idpf_osdep.h | 1 + 5 files changed, 2 insertions(+), 20 deletions(-) diff --git a/drivers/common/idpf/base/idpf_controlq.c b/drivers/common/idpf/base/idpf_controlq.c index 3af81e5a64..8adc727926 100644 --- a/drivers/common/idpf/base/idpf_controlq.c +++ b/drivers/common/idpf/base/idpf_controlq.c @@ -162,11 +162,7 @@ int idpf_ctlq_add(struct idpf_hw *hw, switch (qinfo->type) { case IDPF_CTLQ_TYPE_MAILBOX_RX: is_rxq = true; -#ifdef __KERNEL__ - fallthrough; -#else /* fallthrough */ -#endif /* __KERNEL__ */ case IDPF_CTLQ_TYPE_MAILBOX_TX: status = idpf_ctlq_alloc_ring_res(hw, *cq_out); break; diff --git a/drivers/common/idpf/base/idpf_controlq.h b/drivers/common/idpf/base/idpf_controlq.h index e7b0d803b3..fea8dda618 100644 --- a/drivers/common/idpf/base/idpf_controlq.h +++ b/drivers/common/idpf/base/idpf_controlq.h @@ -5,14 +5,8 @@ #ifndef _IDPF_CONTROLQ_H_ #define _IDPF_CONTROLQ_H_ -#ifdef __KERNEL__ -#include -#endif - -#ifndef __KERNEL__ #include "idpf_osdep.h" #include "idpf_alloc.h" -#endif #include "idpf_controlq_api.h" /* Maximum buffer lengths for all control queue types */ @@ -26,14 +20,12 @@ ((u16)((((R)->next_to_clean > (R)->next_to_use) ? 0 : (R)->ring_size) + \ (R)->next_to_clean - (R)->next_to_use - 1)) -#ifndef __KERNEL__ /* Data type manipulation macros. */ #define IDPF_HI_DWORD(x) ((u32)((((x) >> 16) >> 16) & 0xFFFFFFFF)) #define IDPF_LO_DWORD(x) ((u32)((x) & 0xFFFFFFFF)) #define IDPF_HI_WORD(x) ((u16)(((x) >> 16) & 0xFFFF)) #define IDPF_LO_WORD(x) ((u16)((x) & 0xFFFF)) -#endif /* Control Queue default settings */ #define IDPF_CTRL_SQ_CMD_TIMEOUT 250 /* msecs */ diff --git a/drivers/common/idpf/base/idpf_controlq_api.h b/drivers/common/idpf/base/idpf_controlq_api.h index 32d17baadf..e80debebb8 100644 --- a/drivers/common/idpf/base/idpf_controlq_api.h +++ b/drivers/common/idpf/base/idpf_controlq_api.h @@ -5,14 +5,8 @@ #ifndef _IDPF_CONTROLQ_API_H_ #define _IDPF_CONTROLQ_API_H_ -#ifdef __KERNEL__ -#include "idpf_mem.h" -#else /* !__KERNEL__ */ #include "idpf_osdep.h" -#include -#endif /* !__KERNEL__ */ - struct idpf_hw; /* Used for queue init, response and events */ diff --git a/drivers/common/idpf/base/idpf_lan_txrx.h b/drivers/common/idpf/base/idpf_lan_txrx.h index 98484b267c..2d635a0b9c 100644 --- a/drivers/common/idpf/base/idpf_lan_txrx.h +++ b/drivers/common/idpf/base/idpf_lan_txrx.h @@ -4,9 +4,8 @@ #ifndef _IDPF_LAN_TXRX_H_ #define _IDPF_LAN_TXRX_H_ -#ifndef __KERNEL__ + #include "idpf_osdep.h" -#endif enum idpf_rss_hash { /* Values 0 - 28 are reserved for future use */ diff --git a/drivers/common/idpf/base/idpf_osdep.h b/drivers/common/idpf/base/idpf_osdep.h index 49bd7c4b21..3703421575 100644 --- a/drivers/common/idpf/base/idpf_osdep.h +++ b/drivers/common/idpf/base/idpf_osdep.h @@ -23,6 +23,7 @@ #include #include #include +#include #define INLINE inline #define STATIC static -- 2.31.1