* [PATCH] kbuild: fix spurious error from find when generating asm-headers
@ 2026-09-13 20:07 H. Nikolaus Schaller
2026-09-13 22:39 ` Randy Dunlap
0 siblings, 1 reply; 3+ messages in thread
From: H. Nikolaus Schaller @ 2026-09-13 20:07 UTC (permalink / raw)
To: Nathan Chancellor, Nicolas Schier, H. Nikolaus Schaller,
Thomas Weißschuh, Thomas Gleixner
Cc: linux-kbuild, linux-kernel, letux-kernel
The *.h pattern should be quoted or we may see errors like
find: paths must precede expression: elf.h
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
if the working directory contains some *.h files.
This was found in a cross-compilation environment.
Fixes: 2d69b891e6461 ("kbuild: Support generated asm-headers in subdirectories")
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
| 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--git a/scripts/Makefile.asm-headers b/scripts/Makefile.asm-headers
index b38931314ad7c..9db8ab0145a44 100644
--- a/scripts/Makefile.asm-headers
+++ b/scripts/Makefile.asm-headers
@@ -48,7 +48,7 @@ syscall-y := $(addprefix $(obj)/, $(syscall-y))
generated-y := $(addprefix $(obj)/, $(generated-y))
# Remove stale wrappers when the corresponding files are removed from generic-y
-old-headers := $(shell test -d $(obj) && find $(obj) -name *.h)
+old-headers := $(shell test -d $(obj) && find $(obj) -name '*.h')
unwanted := $(filter-out $(generic-y) $(generated-y) $(syscall-y),$(old-headers))
filechk_wrap = echo "\#include <asm-generic/$*.h>"
--
2.55.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kbuild: fix spurious error from find when generating asm-headers
2026-09-13 20:07 [PATCH] kbuild: fix spurious error from find when generating asm-headers H. Nikolaus Schaller
@ 2026-09-13 22:39 ` Randy Dunlap
2026-09-14 6:03 ` H. Nikolaus Schaller
0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2026-09-13 22:39 UTC (permalink / raw)
To: H. Nikolaus Schaller, Nathan Chancellor, Nicolas Schier,
Thomas Weißschuh, Thomas Gleixner
Cc: linux-kbuild, linux-kernel, letux-kernel
Hi,
On 9/13/26 1:07 PM, H. Nikolaus Schaller wrote:
> The *.h pattern should be quoted or we may see errors like
>
> find: paths must precede expression: elf.h
> Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
>
> if the working directory contains some *.h files.
>
> This was found in a cross-compilation environment.
>
> Fixes: 2d69b891e6461 ("kbuild: Support generated asm-headers in subdirectories")
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> ---
> scripts/Makefile.asm-headers | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/Makefile.asm-headers b/scripts/Makefile.asm-headers
> index b38931314ad7c..9db8ab0145a44 100644
> --- a/scripts/Makefile.asm-headers
> +++ b/scripts/Makefile.asm-headers
> @@ -48,7 +48,7 @@ syscall-y := $(addprefix $(obj)/, $(syscall-y))
> generated-y := $(addprefix $(obj)/, $(generated-y))
>
> # Remove stale wrappers when the corresponding files are removed from generic-y
> -old-headers := $(shell test -d $(obj) && find $(obj) -name *.h)
> +old-headers := $(shell test -d $(obj) && find $(obj) -name '*.h')
> unwanted := $(filter-out $(generic-y) $(generated-y) $(syscall-y),$(old-headers))
>
> filechk_wrap = echo "\#include <asm-generic/$*.h>"
Same as this other patch from 13 hours earlier:
https://lore.kernel.org/linux-kbuild/f54cae8e7da612ad558154706ce2e99f98d136c4.1789282037.git.tanggeliang@kylinos.cn/T/#u
--
~Randy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kbuild: fix spurious error from find when generating asm-headers
2026-09-13 22:39 ` Randy Dunlap
@ 2026-09-14 6:03 ` H. Nikolaus Schaller
0 siblings, 0 replies; 3+ messages in thread
From: H. Nikolaus Schaller @ 2026-09-14 6:03 UTC (permalink / raw)
To: Randy Dunlap
Cc: Nathan Chancellor, Nicolas Schier, Thomas Weißschuh,
Thomas Gleixner, linux-kbuild, linux-kernel, letux-kernel
Indeed!
> Am 14.09.2026 um 00:39 schrieb Randy Dunlap <rdunlap@infradead.org>:
>
> Hi,
>
> On 9/13/26 1:07 PM, H. Nikolaus Schaller wrote:
>> The *.h pattern should be quoted or we may see errors like
>>
>> find: paths must precede expression: elf.h
>> Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
>>
>> if the working directory contains some *.h files.
>>
>> This was found in a cross-compilation environment.
>>
>> Fixes: 2d69b891e6461 ("kbuild: Support generated asm-headers in subdirectories")
>> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
>> ---
>> scripts/Makefile.asm-headers | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/scripts/Makefile.asm-headers b/scripts/Makefile.asm-headers
>> index b38931314ad7c..9db8ab0145a44 100644
>> --- a/scripts/Makefile.asm-headers
>> +++ b/scripts/Makefile.asm-headers
>> @@ -48,7 +48,7 @@ syscall-y := $(addprefix $(obj)/, $(syscall-y))
>> generated-y := $(addprefix $(obj)/, $(generated-y))
>>
>> # Remove stale wrappers when the corresponding files are removed from generic-y
>> -old-headers := $(shell test -d $(obj) && find $(obj) -name *.h)
>> +old-headers := $(shell test -d $(obj) && find $(obj) -name '*.h')
>> unwanted := $(filter-out $(generic-y) $(generated-y) $(syscall-y),$(old-headers))
>>
>> filechk_wrap = echo "\#include <asm-generic/$*.h>"
>
> Same as this other patch from 13 hours earlier:
>
> https://lore.kernel.org/linux-kbuild/f54cae8e7da612ad558154706ce2e99f98d136c4.1789282037.git.tanggeliang@kylinos.cn/T/#u
Anyways, thanks for having it fixed.
BR,
Nikolaus
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-14 6:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-13 20:07 [PATCH] kbuild: fix spurious error from find when generating asm-headers H. Nikolaus Schaller
2026-09-13 22:39 ` Randy Dunlap
2026-09-14 6:03 ` H. Nikolaus Schaller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®