From e079e5ccc2e707e5b6bd3b011e04c9138f159808 Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Wed, 23 Jan 2019 16:15:48 +0200 Subject: device/pci_ops: Inline PCI config accessors for ramstage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Inlining here allows the check for (dev != NULL) to be optimised and evaluated just once inside the calling function body. Change-Id: I0b5b4f4adb8eaa483a31353324da19917db85f4a Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/31751 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Nico Huber --- src/device/pci_device.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/device/pci_device.c') diff --git a/src/device/pci_device.c b/src/device/pci_device.c index 4e51de0713..2233ddca67 100644 --- a/src/device/pci_device.c +++ b/src/device/pci_device.c @@ -693,6 +693,11 @@ void pci_dev_enable_resources(struct device *dev) pci_write_config16(dev, PCI_COMMAND, command); } +void __noreturn pcidev_die(void) +{ + die("PCI: dev is NULL!\n"); +} + void pci_bus_enable_resources(struct device *dev) { u16 ctrl; -- cgit v1.2.3