Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: dts: Avoid unneeded built-in.a in DTS dirs

arch/mips/boot/dts/Makefile collects objects from sub-directories into
built-in.a only when CONFIG_BUILTIN_DTB is enabled. Reflect it also to
the sub-directory Makefiles. This suppresses unneeded built-in.a
creation in arch/mips/boot/dts/*/ directories.

While I am here, I replaced $(patsubst %.dtb, %.dtb.o, $(dtb-y)) with
$(addsuffix .o, $(dtb-y)) to simplify the code a little bit.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Cercueil <paul@crapouillou.net>
Cc: Mathieu Malaterre <malat@debian.org>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: linux-mips@linux-mips.org
Cc: devicetree@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/19099/
Signed-off-by: James Hogan <jhogan@kernel.org>

authored by

Masahiro Yamada and committed by
James Hogan
fca3aa16 6d08b06e

+10 -10
+1 -1
arch/mips/boot/dts/brcm/Makefile
··· 34 34 bcm97425svmb.dtb \ 35 35 bcm97435svmb.dtb 36 36 37 - obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y)) 37 + obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))
+1 -1
arch/mips/boot/dts/cavium-octeon/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 dtb-$(CONFIG_CAVIUM_OCTEON_SOC) += octeon_3xxx.dtb octeon_68xx.dtb 3 3 4 - obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y)) 4 + obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))
+1 -1
arch/mips/boot/dts/ingenic/Makefile
··· 3 3 dtb-$(CONFIG_JZ4770_GCW0) += gcw0.dtb 4 4 dtb-$(CONFIG_JZ4780_CI20) += ci20.dtb 5 5 6 - obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y)) 6 + obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))
+1 -1
arch/mips/boot/dts/lantiq/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 dtb-$(CONFIG_DT_EASY50712) += easy50712.dtb 3 3 4 - obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y)) 4 + obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))
+1 -1
arch/mips/boot/dts/mscc/Makefile
··· 1 1 dtb-$(CONFIG_LEGACY_BOARD_OCELOT) += ocelot_pcb123.dtb 2 2 3 - obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y)) 3 + obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))
+1 -1
arch/mips/boot/dts/mti/Makefile
··· 2 2 dtb-$(CONFIG_MIPS_MALTA) += malta.dtb 3 3 dtb-$(CONFIG_LEGACY_BOARD_SEAD3) += sead3.dtb 4 4 5 - obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y)) 5 + obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))
+1 -1
arch/mips/boot/dts/netlogic/Makefile
··· 5 5 dtb-$(CONFIG_DT_XLP_GVP) += xlp_gvp.dtb 6 6 dtb-$(CONFIG_DT_XLP_RVP) += xlp_rvp.dtb 7 7 8 - obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y)) 8 + obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))
+1 -1
arch/mips/boot/dts/pic32/Makefile
··· 4 4 dtb-$(CONFIG_DTB_PIC32_NONE) += \ 5 5 pic32mzda_sk.dtb 6 6 7 - obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y)) 7 + obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))
+1 -1
arch/mips/boot/dts/ralink/Makefile
··· 6 6 dtb-$(CONFIG_DTB_OMEGA2P) += omega2p.dtb 7 7 dtb-$(CONFIG_DTB_VOCORE2) += vocore2.dtb 8 8 9 - obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y)) 9 + obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))
+1 -1
arch/mips/boot/dts/xilfpga/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 dtb-$(CONFIG_FIT_IMAGE_FDT_XILFPGA) += nexys4ddr.dtb 3 3 4 - obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y)) 4 + obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))