Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1349380
| From | Bjorn Helgaas <bhelgaas@google.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v1 09/12] MIPS: Loongson 3: Use temporary struct resource * to avoid repetition |
| Date | 2016-03-03 18:00 +0100 |
| Message-ID | <r8ELy-1ze-59@gated-at.bofh.it> (permalink) |
| References | <r8ELv-1ze-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Use a temporary struct resource pointer to avoid needless repetition of
"pdev->resource[PCI_ROM_RESOURCE]". No functional change intended.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
arch/mips/pci/fixup-loongson3.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/mips/pci/fixup-loongson3.c b/arch/mips/pci/fixup-loongson3.c
index d708ae4..b66b1eb 100644
--- a/arch/mips/pci/fixup-loongson3.c
+++ b/arch/mips/pci/fixup-loongson3.c
@@ -40,20 +40,20 @@ int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
static void pci_fixup_radeon(struct pci_dev *pdev)
{
- if (pdev->resource[PCI_ROM_RESOURCE].start)
+ struct resource *res = &pdev->resource[PCI_ROM_RESOURCE];
+
+ if (res->start)
return;
if (!loongson_sysconf.vgabios_addr)
return;
- pdev->resource[PCI_ROM_RESOURCE].start =
- loongson_sysconf.vgabios_addr;
- pdev->resource[PCI_ROM_RESOURCE].end =
- loongson_sysconf.vgabios_addr + 256*1024 - 1;
- pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_COPY;
+ res->start = loongson_sysconf.vgabios_addr;
+ res->end = res->start + 256*1024 - 1;
+ res->flags |= IORESOURCE_ROM_COPY;
dev_info(&pdev->dev, "BAR %d: assigned %pR for Radeon ROM\n",
- PCI_ROM_RESOURCE, &pdev->resource[PCI_ROM_RESOURCE]);
+ PCI_ROM_RESOURCE, res);
}
DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_ATI, PCI_ANY_ID,
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v1 00/12] PCI: Rework shadow ROM handling Bjorn Helgaas <bhelgaas@google.com> - 2016-03-03 18:00 +0100 [PATCH v1 07/12] ia64/PCI: Use ioremap() instead of open-coded equivalent Bjorn Helgaas <bhelgaas@google.com> - 2016-03-03 18:00 +0100 [PATCH v1 08/12] ia64/PCI: Keep CPU physical (not virtual) addresses in shadow ROM resource Bjorn Helgaas <bhelgaas@google.com> - 2016-03-03 18:00 +0100 [PATCH v1 11/12] PCI: Remove unused IORESOURCE_ROM_COPY and IORESOURCE_ROM_BIOS_COPY Bjorn Helgaas <bhelgaas@google.com> - 2016-03-03 18:00 +0100 [PATCH v1 09/12] MIPS: Loongson 3: Use temporary struct resource * to avoid repetition Bjorn Helgaas <bhelgaas@google.com> - 2016-03-03 18:00 +0100 [PATCH v1 02/12] PCI: Don't assign or reassign immutable resources Bjorn Helgaas <bhelgaas@google.com> - 2016-03-03 18:10 +0100 Re: [PATCH v1 00/12] PCI: Rework shadow ROM handling Linus Torvalds <torvalds@linux-foundation.org> - 2016-03-03 19:10 +0100
csiph-web