lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240416121838.95427-3-masahiroy@kernel.org>
Date: Tue, 16 Apr 2024 21:18:36 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: linux-kbuild@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
	Masahiro Yamada <masahiroy@...nel.org>
Subject: [PATCH 2/4] Makefile: remove some unnecessary header include paths

The include directive with the double-quote form, #include "...",
first searches for the specified header in the directory containing
the source file.

If all local headers are included using the double-quote form instead
of the angle bracket form, there is no need to add the local directory
to the header search path.

drivers/gpu/drm/imagination and drivers/net/ethernet/aquantia/atlantic
use only the double-quote form for including the local headers, and
there are no generated sources or headers in their directories. Hence,
the local header search path is unneeded.

The same applies to arch/loongarch/kvm/ because TRACE_INCLUDE_PATH is
relative to include/trace/.

I guess there exist more Makefiles with unnecessary header inclusion
paths (and more cases where it is possible to delete the header search
path by replacing #include <...> with #include "..."), but I do not have
an easy way to detect it.

These are unneeded inclusion paths that I happened to find.

Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
---

 arch/loongarch/kvm/Makefile                     | 2 --
 drivers/gpu/drm/imagination/Makefile            | 2 --
 drivers/net/ethernet/aquantia/atlantic/Makefile | 2 --
 3 files changed, 6 deletions(-)

diff --git a/arch/loongarch/kvm/Makefile b/arch/loongarch/kvm/Makefile
index 244467d7792a..7a0108a721c1 100644
--- a/arch/loongarch/kvm/Makefile
+++ b/arch/loongarch/kvm/Makefile
@@ -3,8 +3,6 @@
 # Makefile for LoongArch KVM support
 #
 
-ccflags-y += -I $(srctree)/$(src)
-
 include $(srctree)/virt/kvm/Makefile.kvm
 
 obj-$(CONFIG_KVM) += kvm.o
diff --git a/drivers/gpu/drm/imagination/Makefile b/drivers/gpu/drm/imagination/Makefile
index ec6db8e9b403..3d9d4d40fb80 100644
--- a/drivers/gpu/drm/imagination/Makefile
+++ b/drivers/gpu/drm/imagination/Makefile
@@ -1,8 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0-only OR MIT
 # Copyright (c) 2023 Imagination Technologies Ltd.
 
-subdir-ccflags-y := -I$(srctree)/$(src)
-
 powervr-y := \
 	pvr_ccb.o \
 	pvr_cccb.o \
diff --git a/drivers/net/ethernet/aquantia/atlantic/Makefile b/drivers/net/ethernet/aquantia/atlantic/Makefile
index 8ebcc68e807f..268a055086c4 100644
--- a/drivers/net/ethernet/aquantia/atlantic/Makefile
+++ b/drivers/net/ethernet/aquantia/atlantic/Makefile
@@ -8,8 +8,6 @@
 
 obj-$(CONFIG_AQTION) += atlantic.o
 
-ccflags-y += -I$(srctree)/$(src)
-
 atlantic-objs := aq_main.o \
 	aq_nic.o \
 	aq_pci_func.o \
-- 
2.40.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ