Skip to contentSkip to conversation

pci: Fix warning in setup-res.c on 32-bit platforms with 64-bit resources

PATCH Applied Benjamin Herrenschmidt 2 participants 2 messages Dec 10, 2007 – Dec 20, 2007 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 pci: Fix warning in setup-res.c on 32-bit platforms with 64-bit resources

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

---

 drivers/pci/setup-res.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/pci/setup-res.c +4 -2
Index: linux-work/drivers/pci/setup-res.c
===================================================================
@@ -51,10 +51,12 @@ pci_update_resource(struct pci_dev *dev,
 
 	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)
#1 lore raw

patch pci-fix-warning-in-setup-res.c-on-32-bit-platforms-with-64-bit-resources.patch added to gregkh-2.6 tree

This is a note to let you know that I've just added the patch titled

Subject: PCI: Fix warning in setup-res.c on 32-bit platforms with 64-bit resources

to my gregkh-2.6 tree. Its filename is

pci-fix-warning-in-setup-res.c-on-32-bit-platforms-with-64-bit-resources.patch

This tree can be found at
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/

Quoted 1 line

From [email protected] Sun Dec 9 22:32:23 2007

From: Benjamin Herrenschmidt <[email protected]>
Date: Mon, 10 Dec 2007 17:32:16 +1100
Subject: PCI: Fix warning in setup-res.c on 32-bit platforms with 64-bit resources
To: Greg Kroah-Hartman <[email protected]>
Cc: [email protected], <[email protected]>, <[email protected]>
Message-ID: <[email protected]>

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

---
 drivers/pci/setup-res.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/pci/setup-res.c +4 -2
@@ -51,10 +51,12 @@ pci_update_resource(struct pci_dev *dev,
 
 	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)

Patches currently in gregkh-2.6 which might be from [email protected] are

bad/battery-class-driver.patch driver/adb-convert-from-class_device-to-device.patch driver/kobject-convert-hvc_console-to-use-kref-not-kobject.patch driver/kobject-convert-hvcs-to-use-kref-not-kobject.patch driver/kobject-convert-icom-to-use-kref-not-kobject.patch pci/pci-fix-bus-resource-assignment-on-32-bits-with-64b-resources.patch pci/pci-fix-warning-in-setup-res.c-on-32-bit-platforms-with-64-bit-resources.patch usb/usb-remove-ohci-useless-masking-unmasking-of-wdh-interrupt.patch