Re: [PATCH 1/2] kbuild: do not pass -r to genksyms when *.symref does not exist
From: Nicolas Schier
Date: Thu Nov 14 2024 - 05:57:03 EST
On Tue, Nov 12, 2024 at 02:17:40AM +0900, Masahiro Yamada wrote:
> There is no need to pass '-r /dev/null', which is no-op.
>
> Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx>
> ---
>
> scripts/Makefile.build | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index 8f423a1faf50..36eae845a3e3 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -110,7 +110,7 @@ $(obj)/%.i: $(obj)/%.c FORCE
> genksyms = scripts/genksyms/genksyms \
> $(if $(1), -T $(2)) \
> $(if $(KBUILD_PRESERVE), -p) \
> - -r $(or $(wildcard $(2:.symtypes=.symref)), /dev/null)
> + $(addprefix -r , $(wildcard $(2:.symtypes=.symref)))
>
> # These mirror gensymtypes_S and co below, keep them in synch.
> cmd_gensymtypes_c = $(CPP) -D__GENKSYMS__ $(c_flags) $< | $(genksyms)
> --
> 2.43.0
>
Reviewed-by: Nicolas Schier <nicolas@xxxxxxxxx>