Skip to content

scripts: headers_install: avoid some reprocessing

David Disseldorp linux-kbuild 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 5 repliesIn review
  2. v1 RFC3 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- accept $INFILE prefixes from e.g. make headers_install O=build_dir as reported by Oliver Sang / kernel test robot
- drop extra config filter variable and do it all inline in sed

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2scripts: headers_install: filter ignored configs via sedscripts/headers_install.sh+19 -362 replies
2/2scripts: headers_install: avoid extra sed call for license checkscripts/headers_install.sh+12 -72 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] scripts: headers_install: avoid some reprocessing

scripts/headers_install.sh is relatively inefficient: it parses/modifies headers via unifdef and three sed invocations, with sed output post-processed via grep in one case (user-space CONFIG_ leaks).

These patches attempt to improve simplicity and efficiency by merging two sed calls and processing user-space CONFIG_ leak filters inline.

Output is unaffected, aside from one minor error string change:
error: $INFILE: leak CONFIG_X to user-space
becomes...
error: $INFILE:CONFIG_X leak to user-space

License and CONFIG leak checks have been manually tested via error injection.

Changes since v1 RFC:
- accept $INFILE prefixes from e.g. make headers_install O=build_dir as reported by Oliver Sang / kernel test robot
- drop extra config filter variable and do it all inline in sed

David Disseldorp (2):
scripts: headers_install: filter ignored configs via sed
scripts: headers_install: avoid extra sed call for license check

 scripts/headers_install.sh | 74 ++++++++++++++++----------------------
 1 file changed, 31 insertions(+), 43 deletions(-)