Skip to contentSkip to conversation

PCI hotplug: cpqphp: hex vs decimal typo in cpqhpc_probe()

PATCH Applied Dan Carpenter 2 participants 2 messages Feb 10, 2014 – Feb 11, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI hotplug: cpqphp: hex vs decimal typo in cpqhpc_probe()

This is a static checker fix and I can't test it, but from the context it definitely looks like hexidecimal 0x20 was intended here instead of decimal 20.

drivers/pci/hotplug/cpqphp_core.c +2 -2
index 31273e155e6c..037e2612c5bd 100644
@@ -920,12 +920,12 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 				bus->max_bus_speed = PCI_SPEED_100MHz_PCIX;
 				break;
 			}
-			if (bus_cap & 20) {
+			if (bus_cap & 0x20) {
 				dbg("bus max supports 66MHz PCI-X\n");
 				bus->max_bus_speed = PCI_SPEED_66MHz_PCIX;
 				break;
 			}
-			if (bus_cap & 10) {
+			if (bus_cap & 0x10) {
 				dbg("bus max supports 66MHz PCI\n");
 				bus->max_bus_speed = PCI_SPEED_66MHz;
 				break;
maintainer Applied
#1 lore raw
Quoted 5 lines · Dan Carpenter

This is a static checker fix and I can't test it, but from the context it definitely looks like hexidecimal 0x20 was intended here instead of decimal 20.

Applied to pci/misc for v3.15, thanks a lot!

Bjorn

Quoted 19 lines
drivers/pci/hotplug/cpqphp_core.c +2 -2
index 31273e155e6c..037e2612c5bd 100644
@@ -920,12 +920,12 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 				bus->max_bus_speed = PCI_SPEED_100MHz_PCIX;
 				break;
 			}
-			if (bus_cap & 20) {
+			if (bus_cap & 0x20) {
 				dbg("bus max supports 66MHz PCI-X\n");
 				bus->max_bus_speed = PCI_SPEED_66MHz_PCIX;
 				break;
 			}
-			if (bus_cap & 10) {
+			if (bus_cap & 0x10) {
 				dbg("bus max supports 66MHz PCI\n");
 				bus->max_bus_speed = PCI_SPEED_66MHz;
 				break;