diff mbox series

net: wireless: prefix header search paths with $(srctree)/

Message ID 1548429480-22137-1-git-send-email-yamada.masahiro@socionext.com
State New
Headers show
Series net: wireless: prefix header search paths with $(srctree)/ | expand

Commit Message

Masahiro Yamada Jan. 25, 2019, 3:18 p.m. UTC
Currently, the Kbuild core manipulates header search paths in a crazy
way [1].

To fix this mess, I want all Makefiles to add explicit $(srctree)/ to
the search paths in the srctree. Some Makefiles are already written in
that way, but not all. The goal of this work is to make the notation
consistent, and finally get rid of the gross hacks.

Having whitespaces after -I does not matter since commit 48f6e3cf5bc6
("kbuild: do not drop -I without parameter").

I also removed one header search path in:

  drivers/net/wireless/broadcom/brcm80211/brcmutil/Makefile

I was able to compile without it.

[1]: https://patchwork.kernel.org/patch/9632347/

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

---

 drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefile | 4 ++--
 drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile | 6 +++---
 drivers/net/wireless/broadcom/brcm80211/brcmutil/Makefile | 4 +---
 drivers/net/wireless/intel/iwlwifi/dvm/Makefile           | 2 +-
 drivers/net/wireless/intel/iwlwifi/mvm/Makefile           | 2 +-
 drivers/net/wireless/realtek/rtl818x/rtl8180/Makefile     | 2 +-
 drivers/net/wireless/realtek/rtl818x/rtl8187/Makefile     | 2 +-
 7 files changed, 10 insertions(+), 12 deletions(-)

-- 
2.7.4

Comments

Kalle Valo Jan. 28, 2019, 8:21 a.m. UTC | #1
Masahiro Yamada <yamada.masahiro@socionext.com> writes:

> Currently, the Kbuild core manipulates header search paths in a crazy

> way [1].

>

> To fix this mess, I want all Makefiles to add explicit $(srctree)/ to

> the search paths in the srctree. Some Makefiles are already written in

> that way, but not all. The goal of this work is to make the notation

> consistent, and finally get rid of the gross hacks.

>

> Having whitespaces after -I does not matter since commit 48f6e3cf5bc6

> ("kbuild: do not drop -I without parameter").

>

> I also removed one header search path in:

>

>   drivers/net/wireless/broadcom/brcm80211/brcmutil/Makefile

>

> I was able to compile without it.

>

> [1]: https://patchwork.kernel.org/patch/9632347/

>

> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

> ---

>

>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefile | 4 ++--

>  drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile | 6 +++---

>  drivers/net/wireless/broadcom/brcm80211/brcmutil/Makefile | 4 +---

>  drivers/net/wireless/intel/iwlwifi/dvm/Makefile           | 2 +-

>  drivers/net/wireless/intel/iwlwifi/mvm/Makefile           | 2 +-

>  drivers/net/wireless/realtek/rtl818x/rtl8180/Makefile     | 2 +-

>  drivers/net/wireless/realtek/rtl818x/rtl8187/Makefile     | 2 +-

>  7 files changed, 10 insertions(+), 12 deletions(-)


Luca, is it ok if I take this to wireless-drivers-next even though it
touches iwlwifi makefiles?

-- 
Kalle Valo
Luca Coelho Jan. 28, 2019, 8:26 a.m. UTC | #2
On Mon, 2019-01-28 at 10:21 +0200, Kalle Valo wrote:
> Masahiro Yamada <yamada.masahiro@socionext.com> writes:

> 

> > Currently, the Kbuild core manipulates header search paths in a

> > crazy

> > way [1].

> > 

> > To fix this mess, I want all Makefiles to add explicit $(srctree)/

> > to

> > the search paths in the srctree. Some Makefiles are already written

> > in

> > that way, but not all. The goal of this work is to make the

> > notation

> > consistent, and finally get rid of the gross hacks.

> > 

> > Having whitespaces after -I does not matter since commit

> > 48f6e3cf5bc6

> > ("kbuild: do not drop -I without parameter").

> > 

> > I also removed one header search path in:

> > 

> >   drivers/net/wireless/broadcom/brcm80211/brcmutil/Makefile

> > 

> > I was able to compile without it.

> > 

> > [1]: https://patchwork.kernel.org/patch/9632347/

> > 

> > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

> > ---

> > 

> >  drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefile | 4 ++--

> >  drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile | 6 +++-

> > --

> >  drivers/net/wireless/broadcom/brcm80211/brcmutil/Makefile | 4 +---

> >  drivers/net/wireless/intel/iwlwifi/dvm/Makefile           | 2 +-

> >  drivers/net/wireless/intel/iwlwifi/mvm/Makefile           | 2 +-

> >  drivers/net/wireless/realtek/rtl818x/rtl8180/Makefile     | 2 +-

> >  drivers/net/wireless/realtek/rtl818x/rtl8187/Makefile     | 2 +-

> >  7 files changed, 10 insertions(+), 12 deletions(-)

> 

> Luca, is it ok if I take this to wireless-drivers-next even though it

> touches iwlwifi makefiles?


Sure, it's much easier like that.

Acked-by: Luca Coelho <luciano.coelho@intel.com>


--
Cheers,
Luca.
Kalle Valo Feb. 1, 2019, 12:43 p.m. UTC | #3
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:

> Currently, the Kbuild core manipulates header search paths in a crazy

> way [1].

> 

> To fix this mess, I want all Makefiles to add explicit $(srctree)/ to

> the search paths in the srctree. Some Makefiles are already written in

> that way, but not all. The goal of this work is to make the notation

> consistent, and finally get rid of the gross hacks.

> 

> Having whitespaces after -I does not matter since commit 48f6e3cf5bc6

> ("kbuild: do not drop -I without parameter").

> 

> I also removed one header search path in:

> 

>   drivers/net/wireless/broadcom/brcm80211/brcmutil/Makefile

> 

> I was able to compile without it.

> 

> [1]: https://patchwork.kernel.org/patch/9632347/

> 

> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

> Acked-by: Luca Coelho <luciano.coelho@intel.com>


Patch applied to wireless-drivers-next.git, thanks.

030b43671ae8 wireless: prefix header search paths with $(srctree)/

-- 
https://patchwork.kernel.org/patch/10781533/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
diff mbox series

Patch

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefile b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefile
index 22fd95a..f7cf3e5 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefile
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefile
@@ -16,8 +16,8 @@ 
 # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 ccflags-y += \
-	-Idrivers/net/wireless/broadcom/brcm80211/brcmfmac	\
-	-Idrivers/net/wireless/broadcom/brcm80211/include
+	-I $(srctree)/$(src) \
+	-I $(srctree)/$(src)/../include
 
 obj-$(CONFIG_BRCMFMAC) += brcmfmac.o
 brcmfmac-objs += \
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile
index ed83f33..482d773 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile
@@ -16,9 +16,9 @@ 
 # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 ccflags-y := \
-	-Idrivers/net/wireless/broadcom/brcm80211/brcmsmac \
-	-Idrivers/net/wireless/broadcom/brcm80211/brcmsmac/phy \
-	-Idrivers/net/wireless/broadcom/brcm80211/include
+	-I $(srctree)/$(src) \
+	-I $(srctree)/$(src)/phy \
+	-I $(srctree)/$(src)/../include
 
 brcmsmac-y := \
 	mac80211_if.o \
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmutil/Makefile b/drivers/net/wireless/broadcom/brcm80211/brcmutil/Makefile
index 256c91f..bb02c62 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmutil/Makefile
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmutil/Makefile
@@ -15,9 +15,7 @@ 
 # OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-ccflags-y :=				\
-	-Idrivers/net/wireless/broadcom/brcm80211/brcmutil \
-	-Idrivers/net/wireless/broadcom/brcm80211/include
+ccflags-y := -I $(srctree)/$(src)/../include
 
 obj-$(CONFIG_BRCMUTIL)	+= brcmutil.o
 brcmutil-objs	= utils.o d11.o
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/Makefile b/drivers/net/wireless/intel/iwlwifi/dvm/Makefile
index 702d42b..0486b17 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/Makefile
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/Makefile
@@ -11,4 +11,4 @@  iwldvm-objs		+= rxon.o devices.o
 iwldvm-$(CONFIG_IWLWIFI_LEDS) += led.o
 iwldvm-$(CONFIG_IWLWIFI_DEBUGFS) += debugfs.o
 
-ccflags-y += -I$(src)/../
+ccflags-y += -I $(srctree)/$(src)/../
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/Makefile b/drivers/net/wireless/intel/iwlwifi/mvm/Makefile
index 9ffd219..7d1b318 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/Makefile
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/Makefile
@@ -10,4 +10,4 @@  iwlmvm-$(CONFIG_IWLWIFI_LEDS) += led.o
 iwlmvm-y += tof.o
 iwlmvm-$(CONFIG_PM) += d3.o
 
-ccflags-y += -I$(src)/../
+ccflags-y += -I $(srctree)/$(src)/../
diff --git a/drivers/net/wireless/realtek/rtl818x/rtl8180/Makefile b/drivers/net/wireless/realtek/rtl818x/rtl8180/Makefile
index 2966681..5d6b06d 100644
--- a/drivers/net/wireless/realtek/rtl818x/rtl8180/Makefile
+++ b/drivers/net/wireless/realtek/rtl818x/rtl8180/Makefile
@@ -2,4 +2,4 @@  rtl818x_pci-objs	:= dev.o rtl8225.o sa2400.o max2820.o grf5101.o rtl8225se.o
 
 obj-$(CONFIG_RTL8180)	+= rtl818x_pci.o
 
-ccflags-y += -Idrivers/net/wireless/realtek/rtl818x
+ccflags-y += -I $(srctree)/$(src)/..
diff --git a/drivers/net/wireless/realtek/rtl818x/rtl8187/Makefile b/drivers/net/wireless/realtek/rtl818x/rtl8187/Makefile
index ff07491..95bac73 100644
--- a/drivers/net/wireless/realtek/rtl818x/rtl8187/Makefile
+++ b/drivers/net/wireless/realtek/rtl818x/rtl8187/Makefile
@@ -2,4 +2,4 @@  rtl8187-objs		:= dev.o rtl8225.o leds.o rfkill.o
 
 obj-$(CONFIG_RTL8187)	+= rtl8187.o
 
-ccflags-y += -Idrivers/net/wireless/realtek/rtl818x
+ccflags-y += -I $(srctree)/$(src)/..