Message ID | 20231120235423.4103310-1-masahiroy@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | sh: remove unneeded $(foreach ) | expand |
On Tue, 2023-11-21 at 08:54 +0900, Masahiro Yamada wrote: > There is no need to use $(foreach ...) for iterating over just one > parameter. > > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> > --- > > arch/sh/kernel/vsyscall/Makefile | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/arch/sh/kernel/vsyscall/Makefile b/arch/sh/kernel/vsyscall/Makefile > index 6e8664448048..118744d349e2 100644 > --- a/arch/sh/kernel/vsyscall/Makefile > +++ b/arch/sh/kernel/vsyscall/Makefile > @@ -1,11 +1,10 @@ > # SPDX-License-Identifier: GPL-2.0 > obj-y += vsyscall.o vsyscall-syscall.o vsyscall-syms.o > > -$(obj)/vsyscall-syscall.o: \ > - $(foreach F,trapa,$(obj)/vsyscall-$F.so) > +$(obj)/vsyscall-syscall.o: $(obj)/vsyscall-trapa.so > > # Teach kbuild about targets > -targets += $(foreach F,trapa,vsyscall-$F.o vsyscall-$F.so) > +targets += vsyscall-trapa.o vsyscall-traps.so > targets += vsyscall-note.o vsyscall.lds vsyscall-dummy.o > > # The DSO images are built using a special linker script Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
On Tue, 2023-11-21 at 08:54 +0900, Masahiro Yamada wrote: > There is no need to use $(foreach ...) for iterating over just one > parameter. > > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> > --- > > arch/sh/kernel/vsyscall/Makefile | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/arch/sh/kernel/vsyscall/Makefile b/arch/sh/kernel/vsyscall/Makefile > index 6e8664448048..118744d349e2 100644 > --- a/arch/sh/kernel/vsyscall/Makefile > +++ b/arch/sh/kernel/vsyscall/Makefile > @@ -1,11 +1,10 @@ > # SPDX-License-Identifier: GPL-2.0 > obj-y += vsyscall.o vsyscall-syscall.o vsyscall-syms.o > > -$(obj)/vsyscall-syscall.o: \ > - $(foreach F,trapa,$(obj)/vsyscall-$F.so) > +$(obj)/vsyscall-syscall.o: $(obj)/vsyscall-trapa.so > > # Teach kbuild about targets > -targets += $(foreach F,trapa,vsyscall-$F.o vsyscall-$F.so) > +targets += vsyscall-trapa.o vsyscall-traps.so > targets += vsyscall-note.o vsyscall.lds vsyscall-dummy.o > > # The DSO images are built using a special linker script Applied to my sh-linux tree. Thanks, Adrian
diff --git a/arch/sh/kernel/vsyscall/Makefile b/arch/sh/kernel/vsyscall/Makefile index 6e8664448048..118744d349e2 100644 --- a/arch/sh/kernel/vsyscall/Makefile +++ b/arch/sh/kernel/vsyscall/Makefile @@ -1,11 +1,10 @@ # SPDX-License-Identifier: GPL-2.0 obj-y += vsyscall.o vsyscall-syscall.o vsyscall-syms.o -$(obj)/vsyscall-syscall.o: \ - $(foreach F,trapa,$(obj)/vsyscall-$F.so) +$(obj)/vsyscall-syscall.o: $(obj)/vsyscall-trapa.so # Teach kbuild about targets -targets += $(foreach F,trapa,vsyscall-$F.o vsyscall-$F.so) +targets += vsyscall-trapa.o vsyscall-traps.so targets += vsyscall-note.o vsyscall.lds vsyscall-dummy.o # The DSO images are built using a special linker script
There is no need to use $(foreach ...) for iterating over just one parameter. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> --- arch/sh/kernel/vsyscall/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)