Patchwork [dpdk-dev,37/38] net/sfc/base: improve MCDI interface header inclusion

login
register
mail settings
Submitter Andrew Rybchenko
Date Feb. 7, 2019, 4:29 p.m.
Message ID <1549556983-10896-38-git-send-email-arybchenko@solarflare.com>
Download mbox | patch
Permalink /patch/720873/
State New
Headers show

Comments

Andrew Rybchenko - Feb. 7, 2019, 4:29 p.m.
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 <arybchenko@solarflare.com>
---
 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(-)

Patch

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