summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2024-12-18 19:37:06 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2025-01-10 23:01:22 +0900
commitde0cae9273841ca019e438192d08b7358a002973 (patch)
treee34e21373a2bb5dcae5d36dd63019d46755d42ed
parent41e86fe7ebe9eaf18c394145cc91b08b5ec932a8 (diff)
kheaders: avoid unnecessary process forks of grep
Exclude include/generated/{utsversion.h,autoconf.h} by using the -path option to reduce the cost of forking new processes. No functional changes are intended. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
-rwxr-xr-xkernel/gen_kheaders.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/gen_kheaders.sh b/kernel/gen_kheaders.sh
index a0e3fbf4afa4..c2eba1a0d772 100755
--- a/kernel/gen_kheaders.sh
+++ b/kernel/gen_kheaders.sh
@@ -48,9 +48,9 @@ all_dirs="$all_dirs $dir_list"
# check include/generated/autoconf.h explicitly.
#
# Ignore them for md5 calculation to avoid pointless regeneration.
-headers_md5="$(find $all_dirs -name "*.h" |
- grep -v "include/generated/utsversion.h" |
- grep -v "include/generated/autoconf.h" |
+headers_md5="$(find $all_dirs -name "*.h" -a \
+ ! -path include/generated/utsversion.h -a \
+ ! -path include/generated/autoconf.h |
xargs ls -l | md5sum | cut -d ' ' -f1)"
# Any changes to this script will also cause a rebuild of the archive.