All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] PCI hotplug: cpqphp: hex vs decimal typo in cpqhpc_probe()
@ 2014-02-10 15:23 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2014-02-10 15:23 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Rafael J. Wysocki, Marta Rybczynska, linux-pci, kernel-janitors

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>

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;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [patch] PCI hotplug: cpqphp: hex vs decimal typo in cpqhpc_probe()
@ 2014-02-10 15:23 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2014-02-10 15:23 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Rafael J. Wysocki, Marta Rybczynska, linux-pci, kernel-janitors

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>

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;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [patch] PCI hotplug: cpqphp: hex vs decimal typo in cpqhpc_probe()
  2014-02-10 15:23 ` Dan Carpenter
@ 2014-02-11 23:23   ` Bjorn Helgaas
  -1 siblings, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2014-02-11 23:23 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Rafael J. Wysocki, Marta Rybczynska, linux-pci, kernel-janitors

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;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch] PCI hotplug: cpqphp: hex vs decimal typo in cpqhpc_probe()
@ 2014-02-11 23:23   ` Bjorn Helgaas
  0 siblings, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2014-02-11 23:23 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Rafael J. Wysocki, Marta Rybczynska, linux-pci, kernel-janitors

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;

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-11 23:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-10 15:23 [patch] PCI hotplug: cpqphp: hex vs decimal typo in cpqhpc_probe() Dan Carpenter
2014-02-10 15:23 ` Dan Carpenter
2014-02-11 23:23 ` Bjorn Helgaas
2014-02-11 23:23   ` Bjorn Helgaas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.