Skip to content

Commit

Permalink
kheaders: avoid unnecessary process forks of grep
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
masahir0y committed Jan 10, 2025
1 parent 41e86fe commit de0cae9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kernel/gen_kheaders.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit de0cae9

Please sign in to comment.