From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] pci: Only link pci_rom.o in some cases
Date: Tue, 26 Nov 2019 20:40:59 -0500 [thread overview]
Message-ID: <20191127014100.29733-1-trini@konsulko.com> (raw)
The content of pci_rom.c is only used in a few cases. Only build and
link in these cases to avoid a global variable as gcc doesn't always
discard those when they are unused.
Signed-off-by: Tom Rini <trini@konsulko.com>
---
drivers/pci/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile
index 219473aa7924..da8b826d69c3 100644
--- a/drivers/pci/Makefile
+++ b/drivers/pci/Makefile
@@ -4,12 +4,12 @@
# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
ifneq ($(CONFIG_DM_PCI),)
-obj-y += pci_rom.o
+obj-$(CONFIG_DM_VIDEO) += pci_rom.o
obj-$(CONFIG_PCI) += pci-uclass.o pci_auto.o
obj-$(CONFIG_DM_PCI_COMPAT) += pci_compat.o
obj-$(CONFIG_PCI_SANDBOX) += pci_sandbox.o
obj-$(CONFIG_SANDBOX) += pci-emul-uclass.o
-obj-$(CONFIG_X86) += pci_x86.o
+obj-$(CONFIG_X86) += pci_x86.o pci_rom.o
else
obj-$(CONFIG_PCI) += pci.o pci_auto_old.o
endif
--
2.17.1
next reply other threads:[~2019-11-27 1:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-27 1:40 Tom Rini [this message]
2019-11-27 1:41 ` [U-Boot] [PATCH 2/2] mtd: mtdcore: Drop unused mtd_table Tom Rini
2019-12-04 4:02 ` Tom Rini
2019-12-04 4:02 ` [U-Boot] [PATCH 1/2] pci: Only link pci_rom.o in some cases Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191127014100.29733-1-trini@konsulko.com \
--to=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox