From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id F12EA1B580 for ; Thu, 7 Feb 2019 17:30:38 +0100 (CET) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (webmail.solarflare.com [12.187.104.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us4.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 839F9B400AF for ; Thu, 7 Feb 2019 16:30:37 +0000 (UTC) Received: from ocex03.SolarFlarecom.com (10.20.40.36) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 7 Feb 2019 08:30:32 -0800 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Thu, 7 Feb 2019 08:30:32 -0800 Received: from ukv-loginhost.uk.solarflarecom.com (ukv-loginhost.uk.solarflarecom.com [10.17.10.39]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id x17GUVLi015402 for ; Thu, 7 Feb 2019 16:30:31 GMT Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id ED2131613EB for ; Thu, 7 Feb 2019 16:30:30 +0000 (GMT) From: Andrew Rybchenko To: Date: Thu, 7 Feb 2019 16:29:42 +0000 Message-ID: <1549556983-10896-38-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1549556983-10896-1-git-send-email-arybchenko@solarflare.com> References: <1549556983-10896-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24412.006 X-TM-AS-Result: No-4.677000-4.000000-10 X-TMASE-MatchedRID: E3bo5kZrbaWdXNOCtK/uyTbN0t/c2qF2G1MJZJUELLidnP2txNDmi41j AJzOtyu36Dt5NCmyuWWcdguUnFpuXBo/F4wweNBuh2VzUlo4HVMDUlZM93vMw1OitEi5p2m0cHj giTON9jKPqQJ9fQR1zuGKEwEzyKksFzVT4QVLabJw5vTXndERpXN3sLsG0mhuQKCRBZM9eAejxY yRBa/qJShNCXvA0fw+jaPj0W1qn0SujVRFkkVsm+2L4/0y+N66ynyLum253YZKCmPA5kD2Diykl eRbXHC1Za+uZbMi9sBikG6urSQhEauj+PD/B1srpd+YSVwN9Y6q30meJWKJEE+9nKAUfbd9OiMM fiztpo/4XWZPvl2TZLAodBnVXNL5WPUbFT+qSXA= X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--4.677000-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24412.006 X-MDID: 1549557038-FfnPmXbGq93K Subject: [dpdk-dev] [PATCH 37/38] net/sfc/base: improve MCDI interface header inclusion 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: , X-List-Received-Date: Thu, 07 Feb 2019 16:30:39 -0000 Include efx_mcdi.h from main internal header efx_impl.h directly instead of indirect inclusion via family-specific header. It avoids duplication and fixes Medford and Medford2 cases where the header inclusion is lost. Correctness is still guaranteed by checks in efx_check.h which require EFSYS_OPT_MCDI for corresponding families and do not allow to enable the option if no family requires it. Signed-off-by: Andrew Rybchenko --- drivers/net/sfc/base/efx_impl.h | 3 +++ drivers/net/sfc/base/hunt_impl.h | 1 - drivers/net/sfc/base/siena_impl.h | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/sfc/base/efx_impl.h b/drivers/net/sfc/base/efx_impl.h index eb2bdc959..56d293b40 100644 --- a/drivers/net/sfc/base/efx_impl.h +++ b/drivers/net/sfc/base/efx_impl.h @@ -10,6 +10,9 @@ #include "efx.h" #include "efx_regs.h" #include "efx_regs_ef10.h" +#if EFSYS_OPT_MCDI +#include "efx_mcdi.h" +#endif /* EFSYS_OPT_MCDI */ /* FIXME: Add definition for driver generated software events */ #ifndef ESE_DZ_EV_CODE_DRV_GEN_EV diff --git a/drivers/net/sfc/base/hunt_impl.h b/drivers/net/sfc/base/hunt_impl.h index a76602d52..3c1cb6214 100644 --- a/drivers/net/sfc/base/hunt_impl.h +++ b/drivers/net/sfc/base/hunt_impl.h @@ -10,7 +10,6 @@ #include "efx.h" #include "efx_regs.h" #include "efx_regs_ef10.h" -#include "efx_mcdi.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/net/sfc/base/siena_impl.h b/drivers/net/sfc/base/siena_impl.h index 4af9845fe..1adb8a437 100644 --- a/drivers/net/sfc/base/siena_impl.h +++ b/drivers/net/sfc/base/siena_impl.h @@ -9,7 +9,6 @@ #include "efx.h" #include "efx_regs.h" -#include "efx_mcdi.h" #include "siena_flash.h" #ifdef __cplusplus -- 2.17.1