Skip to contentSkip to conversation

igc: Remove no need includes from igc_mac.h

PATCH New Sasha Neftin 2 participants 2 messages Feb 23, 2021 – Feb 24, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 igc: Remove no need includes from igc_mac.h

igc_defines.h and igc_phy.h included in igc_hw.h Therefore no need to include these headers in igc_mac.h where is include igc_hw.h

---
 drivers/net/ethernet/intel/igc/igc_mac.h | 2 --
 1 file changed, 2 deletions(-)
drivers/net/ethernet/intel/igc/igc_mac.h +0 -2
index b5963f86defb..04d0cadfa3d6 100644
@@ -5,8 +5,6 @@
 #define _IGC_MAC_H_
 
 #include "igc_hw.h"
-#include "igc_phy.h"
-#include "igc_defines.h"
 
 /* forward declaration */
 s32 igc_disable_pcie_master(struct igc_hw *hw);
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/1 igc: Remove no need includes from igc_mac.h

Quoted 3 lines · Sasha Neftin

igc_defines.h and igc_phy.h included in igc_hw.h Therefore no need to include these headers in igc_mac.h where is include igc_hw.h

From the submit-checklist, we don't want to be relying on other files' includes.

If you use a facility then #include the file that
defines/declares
that facility. Don't depend on other header files pulling in
ones
that you use.

https://www.kernel.org/doc/Documentation/process/submit-checklist.rst

Though we aren't perfect in this, we shouldn't be removing this as it's desired.

Thanks,
Tony