projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95881c8
)
PCI: Simplify pci_pio_to_address()
author
Bjorn Helgaas
<bhelgaas@google.com>
Mon, 7 Dec 2020 19:55:06 +0000
(13:55 -0600)
committer
Bjorn Helgaas
<bhelgaas@google.com>
Fri, 25 Aug 2023 13:15:22 +0000
(08:15 -0500)
Simplify pci_pio_to_address() by removing an unnecessary local variable.
No functional change intended.
Link:
https://lore.kernel.org/r/20230824193712.542167-8-helgaas@kernel.org
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/pci/pci.c
patch
|
blob
|
history
diff --git
a/drivers/pci/pci.c
b/drivers/pci/pci.c
index 60230da957e0c4b1d4481a191dfa709600f2b48b..4d2b11c71e621b11007eb1091b38983df66d3a94 100644
(file)
--- a/
drivers/pci/pci.c
+++ b/
drivers/pci/pci.c
@@
-4191,16
+4191,12
@@
int pci_register_io_range(struct fwnode_handle *fwnode, phys_addr_t addr,
phys_addr_t pci_pio_to_address(unsigned long pio)
{
- phys_addr_t address = (phys_addr_t)OF_BAD_ADDR;
-
#ifdef PCI_IOBASE
- if (pio >= MMIO_UPPER_LIMIT)
- return address;
-
- address = logic_pio_to_hwaddr(pio);
+ if (pio < MMIO_UPPER_LIMIT)
+ return logic_pio_to_hwaddr(pio);
#endif
- return
address
;
+ return
(phys_addr_t) OF_BAD_ADDR
;
}
EXPORT_SYMBOL_GPL(pci_pio_to_address);