Skip to content

Commit

Permalink
PCI: Fix warning in setup-res.c on 32-bit platforms with 64-bit resou…
Browse files Browse the repository at this point in the history
…rces

This adds appropriate casts to avoid a warning and print the correct
values in pr_debug.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Benjamin Herrenschmidt authored and Greg Kroah-Hartman committed Feb 1, 2008
1 parent c40a22e commit 6015fbe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/pci/setup-res.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)

pcibios_resource_to_bus(dev, &region, res);

pr_debug(" got res [%llx:%llx] bus [%lx:%lx] flags %lx for "
pr_debug(" got res [%llx:%llx] bus [%llx:%llx] flags %lx for "
"BAR %d of %s\n", (unsigned long long)res->start,
(unsigned long long)res->end,
region.start, region.end, res->flags, resno, pci_name(dev));
(unsigned long long)region.start,
(unsigned long long)region.end,
(unsigned long)res->flags, resno, pci_name(dev));

new = region.start | (res->flags & PCI_REGION_FLAG_MASK);
if (res->flags & IORESOURCE_IO)
Expand Down

0 comments on commit 6015fbe

Please sign in to comment.