diff mbox

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

Message ID 20140210152350.GA24189@elgon.mountain (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

Dan Carpenter Feb. 10, 2014, 3:23 p.m. UTC
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.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Bjorn Helgaas Feb. 11, 2014, 11:23 p.m. UTC | #1
On Mon, Feb 10, 2014 at 06:23:50PM +0300, Dan Carpenter wrote:
> 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.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

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

Bjorn

> diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c
> index 31273e155e6c..037e2612c5bd 100644
> --- a/drivers/pci/hotplug/cpqphp_core.c
> +++ b/drivers/pci/hotplug/cpqphp_core.c
> @@ -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;
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c
index 31273e155e6c..037e2612c5bd 100644
--- a/drivers/pci/hotplug/cpqphp_core.c
+++ b/drivers/pci/hotplug/cpqphp_core.c
@@ -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;