]> git.droids-corp.org - dpdk.git/commitdiff
net/sfc/base: improve MCDI interface header inclusion
authorAndrew Rybchenko <arybchenko@solarflare.com>
Thu, 7 Feb 2019 16:29:42 +0000 (16:29 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 8 Feb 2019 10:35:41 +0000 (11:35 +0100)
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
drivers/net/sfc/base/hunt_impl.h
drivers/net/sfc/base/siena_impl.h

index eb2bdc95986204afa955f35136d1b2a11a833e32..56d293b40a726c34fd4e8c5f2a0adfab997d7824 100644 (file)
@@ -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
index a76602d52ac02ba37f0658a5e915ec355d1e7591..3c1cb6214197be83ba1b6717c4ab5122fef6d220 100644 (file)
@@ -10,7 +10,6 @@
 #include "efx.h"
 #include "efx_regs.h"
 #include "efx_regs_ef10.h"
-#include "efx_mcdi.h"
 
 #ifdef __cplusplus
 extern "C" {
index 4af9845fee70be8677792bc6fc61ceff7a877e39..1adb8a437e01d6136ef56578aab26adafae4c7b2 100644 (file)
@@ -9,7 +9,6 @@
 
 #include "efx.h"
 #include "efx_regs.h"
-#include "efx_mcdi.h"
 #include "siena_flash.h"
 
 #ifdef __cplusplus