* [PATCH] usb/host/ohci-hcd.c: fix sparse warnings
@ 2009-04-16 2:04 H Hartley Sweeten
2009-04-22 5:53 ` Greg KH
0 siblings, 1 reply; 8+ messages in thread
From: H Hartley Sweeten @ 2009-04-16 2:04 UTC (permalink / raw)
To: linux-kernel
Fix sparse warnings in drivers/usb/host/ohci-hcd.c.
warning: symbol 'temp' shadows an earlier one
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
---
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 25db704..7635acf 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -571,7 +571,7 @@ static int ohci_init (struct ohci_hcd *ohci)
*/
static int ohci_run (struct ohci_hcd *ohci)
{
- u32 mask, temp;
+ u32 mask, val;
int first = ohci->fminterval == 0;
struct usb_hcd *hcd = ohci_to_hcd(ohci);
@@ -580,8 +580,8 @@ static int ohci_run (struct ohci_hcd *ohci)
/* boot firmware should have set this up (5.1.1.3.1) */
if (first) {
- temp = ohci_readl (ohci, &ohci->regs->fminterval);
- ohci->fminterval = temp & 0x3fff;
+ val = ohci_readl (ohci, &ohci->regs->fminterval);
+ ohci->fminterval = val & 0x3fff;
if (ohci->fminterval != FI)
ohci_dbg (ohci, "fminterval delta %d\n",
ohci->fminterval - FI);
@@ -600,25 +600,25 @@ static int ohci_run (struct ohci_hcd *ohci)
switch (ohci->hc_control & OHCI_CTRL_HCFS) {
case OHCI_USB_OPER:
- temp = 0;
+ val = 0;
break;
case OHCI_USB_SUSPEND:
case OHCI_USB_RESUME:
ohci->hc_control &= OHCI_CTRL_RWC;
ohci->hc_control |= OHCI_USB_RESUME;
- temp = 10 /* msec wait */;
+ val = 10 /* msec wait */;
break;
// case OHCI_USB_RESET:
default:
ohci->hc_control &= OHCI_CTRL_RWC;
ohci->hc_control |= OHCI_USB_RESET;
- temp = 50 /* msec wait */;
+ val = 50 /* msec wait */;
break;
}
ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
// flush the writes
(void) ohci_readl (ohci, &ohci->regs->control);
- msleep(temp);
+ msleep(val);
memset (ohci->hcca, 0, sizeof (struct ohci_hcca));
@@ -628,9 +628,9 @@ static int ohci_run (struct ohci_hcd *ohci)
retry:
/* HC Reset requires max 10 us delay */
ohci_writel (ohci, OHCI_HCR, &ohci->regs->cmdstatus);
- temp = 30; /* ... allow extra time */
+ val = 30; /* ... allow extra time */
while ((ohci_readl (ohci, &ohci->regs->cmdstatus) & OHCI_HCR) !=
0) {
- if (--temp == 0) {
+ if (--val == 0) {
spin_unlock_irq (&ohci->lock);
ohci_err (ohci, "USB HC reset timed out!\n");
return -1;
@@ -699,23 +699,23 @@ retry:
ohci_writel (ohci, mask, &ohci->regs->intrenable);
/* handle root hub init quirks ... */
- temp = roothub_a (ohci);
- temp &= ~(RH_A_PSM | RH_A_OCPM);
+ val = roothub_a (ohci);
+ val &= ~(RH_A_PSM | RH_A_OCPM);
if (ohci->flags & OHCI_QUIRK_SUPERIO) {
/* NSC 87560 and maybe others */
- temp |= RH_A_NOCP;
- temp &= ~(RH_A_POTPGT | RH_A_NPS);
- ohci_writel (ohci, temp, &ohci->regs->roothub.a);
+ val |= RH_A_NOCP;
+ val &= ~(RH_A_POTPGT | RH_A_NPS);
+ ohci_writel (ohci, val, &ohci->regs->roothub.a);
} else if ((ohci->flags & OHCI_QUIRK_AMD756) ||
(ohci->flags & OHCI_QUIRK_HUB_POWER)) {
/* hub power always on; required for AMD-756 and some
* Mac platforms. ganged overcurrent reporting, if any.
*/
- temp |= RH_A_NPS;
- ohci_writel (ohci, temp, &ohci->regs->roothub.a);
+ val |= RH_A_NPS;
+ ohci_writel (ohci, val, &ohci->regs->roothub.a);
}
ohci_writel (ohci, RH_HS_LPSC, &ohci->regs->roothub.status);
- ohci_writel (ohci, (temp & RH_A_NPS) ? 0 : RH_B_PPCM,
+ ohci_writel (ohci, (val & RH_A_NPS) ? 0 : RH_B_PPCM,
&ohci->regs->roothub.b);
// flush those writes
(void) ohci_readl (ohci, &ohci->regs->control);
@@ -724,7 +724,7 @@ retry:
spin_unlock_irq (&ohci->lock);
// POTPGT delay is bits 24-31, in 2 ms units.
- mdelay ((temp >> 23) & 0x1fe);
+ mdelay ((val >> 23) & 0x1fe);
hcd->state = HC_STATE_RUNNING;
if (quirk_zfmicro(ohci)) {
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] usb/host/ohci-hcd.c: fix sparse warnings
2009-04-16 2:04 [PATCH] usb/host/ohci-hcd.c: fix sparse warnings H Hartley Sweeten
@ 2009-04-22 5:53 ` Greg KH
2009-04-22 17:39 ` H Hartley Sweeten
0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2009-04-22 5:53 UTC (permalink / raw)
To: H Hartley Sweeten; +Cc: linux-kernel
On Wed, Apr 15, 2009 at 10:04:17PM -0400, H Hartley Sweeten wrote:
> Fix sparse warnings in drivers/usb/host/ohci-hcd.c.
>
> warning: symbol 'temp' shadows an earlier one
>
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
I'm not seeing this sparse warning either.
And you didn't fix the two sparse warnings I am seeing in this file, so
I'm going to think this patch doesn't really do anything :(
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] usb/host/ohci-hcd.c: fix sparse warnings
2009-04-22 5:53 ` Greg KH
@ 2009-04-22 17:39 ` H Hartley Sweeten
2009-04-22 17:42 ` Greg KH
0 siblings, 1 reply; 8+ messages in thread
From: H Hartley Sweeten @ 2009-04-22 17:39 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel
On Tuesday, April 21, 2009 10:53 PM, Greg KH wrote:
> On Wed, Apr 15, 2009 at 10:04:17PM -0400, H Hartley Sweeten wrote:
> Fix sparse warnings in drivers/usb/host/ohci-hcd.c.
>>
>> warning: symbol 'temp' shadows an earlier one
>>
>> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
>
> I'm not seeing this sparse warning either.
>
> And you didn't fix the two sparse warnings I am seeing in this file,
> so I'm going to think this patch doesn't really do anything :(
Following are the sparse warnings I am seeing when building for an
EP93xx ARM platform:
CHECK drivers/usb/host/ohci-hcd.c
drivers/usb/host/ohci-hcd.c:626:2: warning: symbol 'temp' shadows an
earlier one
drivers/usb/host/ohci-hcd.c:574:14: originally declared here
drivers/usb/host/ohci-hcd.c:634:4: warning: symbol 'temp' shadows an
earlier one
drivers/usb/host/ohci-hcd.c:574:14: originally declared here
drivers/usb/host/ohci-hcd.c:676:3: warning: symbol 'temp' shadows an
earlier one
drivers/usb/host/ohci-hcd.c:574:14: originally declared here
drivers/usb/host/ohci-hcd.c:724:2: warning: symbol 'temp' shadows an
earlier one
drivers/usb/host/ohci-hcd.c:574:14: originally declared here
drivers/usb/host/ohci-q.c:69:2: warning: context imbalance in
'finish_urb': __context__ statement expected different context
drivers/usb/host/ohci-q.c:69:2: context '<noident>': wanted >= 0, got
-1
drivers/usb/host/ohci-q.c:991:15: warning: context problem in
'finish_unlinks': 'finish_urb' expected different context
drivers/usb/host/ohci-q.c:991:15: context 'lock': wanted >= 1, got 0
drivers/usb/host/ohci-q.c:1082:13: warning: context problem in
'takeback_td': 'finish_urb' expected different context
drivers/usb/host/ohci-q.c:1082:13: context 'lock': wanted >= 1, got 0
drivers/usb/host/ohci-hcd.c:298:14: warning: context problem in
'ohci_urb_dequeue': 'finish_urb' expected different context
drivers/usb/host/ohci-hcd.c:298:14: context 'lock': wanted >= 1, got
0
All the 'temp' shadows warnings appear to be caused by the
raw_local_irq_disable() macro in arch/arm/include/asm/irqflags.h.
I have no idea how to fix the context imbalance warnings so I left
those alone. The functions seem to be tagged correctly with __releases()
and __acquires() as needed. Could those be a problem with sparse?
> thanks,
>
> greg k-h
Regards,
Hartley
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] usb/host/ohci-hcd.c: fix sparse warnings
2009-04-22 17:39 ` H Hartley Sweeten
@ 2009-04-22 17:42 ` Greg KH
2009-04-22 17:50 ` H Hartley Sweeten
2009-04-22 20:18 ` H Hartley Sweeten
0 siblings, 2 replies; 8+ messages in thread
From: Greg KH @ 2009-04-22 17:42 UTC (permalink / raw)
To: H Hartley Sweeten; +Cc: linux-kernel
On Wed, Apr 22, 2009 at 01:39:34PM -0400, H Hartley Sweeten wrote:
> On Tuesday, April 21, 2009 10:53 PM, Greg KH wrote:
> > On Wed, Apr 15, 2009 at 10:04:17PM -0400, H Hartley Sweeten wrote:
> > Fix sparse warnings in drivers/usb/host/ohci-hcd.c.
> >>
> >> warning: symbol 'temp' shadows an earlier one
> >>
> >> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> >
> > I'm not seeing this sparse warning either.
> >
> > And you didn't fix the two sparse warnings I am seeing in this file,
> > so I'm going to think this patch doesn't really do anything :(
>
> Following are the sparse warnings I am seeing when building for an
> EP93xx ARM platform:
Ah, on ARM, sorry, I was building on x86.
Care to respin this one, and your other one without the whitespace
changes and line-wraps and resend them?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] usb/host/ohci-hcd.c: fix sparse warnings
2009-04-22 17:42 ` Greg KH
@ 2009-04-22 17:50 ` H Hartley Sweeten
2009-04-22 19:23 ` Greg KH
2009-04-22 20:18 ` H Hartley Sweeten
1 sibling, 1 reply; 8+ messages in thread
From: H Hartley Sweeten @ 2009-04-22 17:50 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel
On Wednesday, April 22, 2009 10:42 AM, Greg KH wrote:
> On Wed, Apr 22, 2009 at 01:39:34PM -0400, H Hartley Sweeten wrote:
>> On Tuesday, April 21, 2009 10:53 PM, Greg KH wrote:
>>> On Wed, Apr 15, 2009 at 10:04:17PM -0400, H Hartley Sweeten wrote:
>>> Fix sparse warnings in drivers/usb/host/ohci-hcd.c.
>>>>
>>>> warning: symbol 'temp' shadows an earlier one
>>>>
>>>> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
>>>
>>> I'm not seeing this sparse warning either.
>>>
>>> And you didn't fix the two sparse warnings I am seeing in this file,
>>> so I'm going to think this patch doesn't really do anything :(
>>
>> Following are the sparse warnings I am seeing when building for an
>> EP93xx ARM platform:
>
> Ah, on ARM, sorry, I was building on x86.
>
> Care to respin this one, and your other one without the whitespace
> changes and line-wraps and resend them?
Not a problem. I will have to attach the patches to avoid the
line-warps.
It appears that the wrapping is occurring when my emails be bounced thru
one of my ISP's servers. I'm still trying to resolve that.
Question: How do you do a git diff and keep the whitespace changes out?
> thanks,
>
> greg k-h
Regards,
Hartley
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] usb/host/ohci-hcd.c: fix sparse warnings
2009-04-22 17:50 ` H Hartley Sweeten
@ 2009-04-22 19:23 ` Greg KH
0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2009-04-22 19:23 UTC (permalink / raw)
To: H Hartley Sweeten; +Cc: linux-kernel
On Wed, Apr 22, 2009 at 01:50:56PM -0400, H Hartley Sweeten wrote:
> On Wednesday, April 22, 2009 10:42 AM, Greg KH wrote:
> > On Wed, Apr 22, 2009 at 01:39:34PM -0400, H Hartley Sweeten wrote:
> >> On Tuesday, April 21, 2009 10:53 PM, Greg KH wrote:
> >>> On Wed, Apr 15, 2009 at 10:04:17PM -0400, H Hartley Sweeten wrote:
> >>> Fix sparse warnings in drivers/usb/host/ohci-hcd.c.
> >>>>
> >>>> warning: symbol 'temp' shadows an earlier one
> >>>>
> >>>> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> >>>
> >>> I'm not seeing this sparse warning either.
> >>>
> >>> And you didn't fix the two sparse warnings I am seeing in this file,
> >>> so I'm going to think this patch doesn't really do anything :(
> >>
> >> Following are the sparse warnings I am seeing when building for an
> >> EP93xx ARM platform:
> >
> > Ah, on ARM, sorry, I was building on x86.
> >
> > Care to respin this one, and your other one without the whitespace
> > changes and line-wraps and resend them?
>
> Not a problem. I will have to attach the patches to avoid the
> line-warps.
> It appears that the wrapping is occurring when my emails be bounced thru
> one of my ISP's servers. I'm still trying to resolve that.
>
> Question: How do you do a git diff and keep the whitespace changes out?
Don't do the whitespace changes in the first place :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] usb/host/ohci-hcd.c: fix sparse warnings
2009-04-22 17:42 ` Greg KH
2009-04-22 17:50 ` H Hartley Sweeten
@ 2009-04-22 20:18 ` H Hartley Sweeten
2009-04-22 20:29 ` Greg KH
1 sibling, 1 reply; 8+ messages in thread
From: H Hartley Sweeten @ 2009-04-22 20:18 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 3963 bytes --]
Fix sparse warnings in drivers/usb/host/ohci-hcd.c.
Four of the following sparse warning are seen when building on
ARM due do the macro raw_local_irq_save():
warning: symbol 'temp' shadows an earlier one
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
---
Patch is also attached in case of line-wrapping.
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 25db704..7635acf 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -571,7 +571,7 @@ static int ohci_init (struct ohci_hcd *ohci)
*/
static int ohci_run (struct ohci_hcd *ohci)
{
- u32 mask, temp;
+ u32 mask, val;
int first = ohci->fminterval == 0;
struct usb_hcd *hcd = ohci_to_hcd(ohci);
@@ -580,8 +580,8 @@ static int ohci_run (struct ohci_hcd *ohci)
/* boot firmware should have set this up (5.1.1.3.1) */
if (first) {
- temp = ohci_readl (ohci, &ohci->regs->fminterval);
- ohci->fminterval = temp & 0x3fff;
+ val = ohci_readl (ohci, &ohci->regs->fminterval);
+ ohci->fminterval = val & 0x3fff;
if (ohci->fminterval != FI)
ohci_dbg (ohci, "fminterval delta %d\n",
ohci->fminterval - FI);
@@ -600,25 +600,25 @@ static int ohci_run (struct ohci_hcd *ohci)
switch (ohci->hc_control & OHCI_CTRL_HCFS) {
case OHCI_USB_OPER:
- temp = 0;
+ val = 0;
break;
case OHCI_USB_SUSPEND:
case OHCI_USB_RESUME:
ohci->hc_control &= OHCI_CTRL_RWC;
ohci->hc_control |= OHCI_USB_RESUME;
- temp = 10 /* msec wait */;
+ val = 10 /* msec wait */;
break;
// case OHCI_USB_RESET:
default:
ohci->hc_control &= OHCI_CTRL_RWC;
ohci->hc_control |= OHCI_USB_RESET;
- temp = 50 /* msec wait */;
+ val = 50 /* msec wait */;
break;
}
ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
// flush the writes
(void) ohci_readl (ohci, &ohci->regs->control);
- msleep(temp);
+ msleep(val);
memset (ohci->hcca, 0, sizeof (struct ohci_hcca));
@@ -628,9 +628,9 @@ static int ohci_run (struct ohci_hcd *ohci)
retry:
/* HC Reset requires max 10 us delay */
ohci_writel (ohci, OHCI_HCR, &ohci->regs->cmdstatus);
- temp = 30; /* ... allow extra time */
+ val = 30; /* ... allow extra time */
while ((ohci_readl (ohci, &ohci->regs->cmdstatus) & OHCI_HCR) !=
0) {
- if (--temp == 0) {
+ if (--val == 0) {
spin_unlock_irq (&ohci->lock);
ohci_err (ohci, "USB HC reset timed out!\n");
return -1;
@@ -699,23 +699,23 @@ retry:
ohci_writel (ohci, mask, &ohci->regs->intrenable);
/* handle root hub init quirks ... */
- temp = roothub_a (ohci);
- temp &= ~(RH_A_PSM | RH_A_OCPM);
+ val = roothub_a (ohci);
+ val &= ~(RH_A_PSM | RH_A_OCPM);
if (ohci->flags & OHCI_QUIRK_SUPERIO) {
/* NSC 87560 and maybe others */
- temp |= RH_A_NOCP;
- temp &= ~(RH_A_POTPGT | RH_A_NPS);
- ohci_writel (ohci, temp, &ohci->regs->roothub.a);
+ val |= RH_A_NOCP;
+ val &= ~(RH_A_POTPGT | RH_A_NPS);
+ ohci_writel (ohci, val, &ohci->regs->roothub.a);
} else if ((ohci->flags & OHCI_QUIRK_AMD756) ||
(ohci->flags & OHCI_QUIRK_HUB_POWER)) {
/* hub power always on; required for AMD-756 and some
* Mac platforms. ganged overcurrent reporting, if any.
*/
- temp |= RH_A_NPS;
- ohci_writel (ohci, temp, &ohci->regs->roothub.a);
+ val |= RH_A_NPS;
+ ohci_writel (ohci, val, &ohci->regs->roothub.a);
}
ohci_writel (ohci, RH_HS_LPSC, &ohci->regs->roothub.status);
- ohci_writel (ohci, (temp & RH_A_NPS) ? 0 : RH_B_PPCM,
+ ohci_writel (ohci, (val & RH_A_NPS) ? 0 : RH_B_PPCM,
&ohci->regs->roothub.b);
// flush those writes
(void) ohci_readl (ohci, &ohci->regs->control);
@@ -724,7 +724,7 @@ retry:
spin_unlock_irq (&ohci->lock);
// POTPGT delay is bits 24-31, in 2 ms units.
- mdelay ((temp >> 23) & 0x1fe);
+ mdelay ((val >> 23) & 0x1fe);
hcd->state = HC_STATE_RUNNING;
if (quirk_zfmicro(ohci)) {
[-- Attachment #2: usb_host_ohci-hcd_c_sparse.patch --]
[-- Type: application/octet-stream, Size: 3511 bytes --]
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 25db704..7635acf 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -571,7 +571,7 @@ static int ohci_init (struct ohci_hcd *ohci)
*/
static int ohci_run (struct ohci_hcd *ohci)
{
- u32 mask, temp;
+ u32 mask, val;
int first = ohci->fminterval == 0;
struct usb_hcd *hcd = ohci_to_hcd(ohci);
@@ -580,8 +580,8 @@ static int ohci_run (struct ohci_hcd *ohci)
/* boot firmware should have set this up (5.1.1.3.1) */
if (first) {
- temp = ohci_readl (ohci, &ohci->regs->fminterval);
- ohci->fminterval = temp & 0x3fff;
+ val = ohci_readl (ohci, &ohci->regs->fminterval);
+ ohci->fminterval = val & 0x3fff;
if (ohci->fminterval != FI)
ohci_dbg (ohci, "fminterval delta %d\n",
ohci->fminterval - FI);
@@ -600,25 +600,25 @@ static int ohci_run (struct ohci_hcd *ohci)
switch (ohci->hc_control & OHCI_CTRL_HCFS) {
case OHCI_USB_OPER:
- temp = 0;
+ val = 0;
break;
case OHCI_USB_SUSPEND:
case OHCI_USB_RESUME:
ohci->hc_control &= OHCI_CTRL_RWC;
ohci->hc_control |= OHCI_USB_RESUME;
- temp = 10 /* msec wait */;
+ val = 10 /* msec wait */;
break;
// case OHCI_USB_RESET:
default:
ohci->hc_control &= OHCI_CTRL_RWC;
ohci->hc_control |= OHCI_USB_RESET;
- temp = 50 /* msec wait */;
+ val = 50 /* msec wait */;
break;
}
ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
// flush the writes
(void) ohci_readl (ohci, &ohci->regs->control);
- msleep(temp);
+ msleep(val);
memset (ohci->hcca, 0, sizeof (struct ohci_hcca));
@@ -628,9 +628,9 @@ static int ohci_run (struct ohci_hcd *ohci)
retry:
/* HC Reset requires max 10 us delay */
ohci_writel (ohci, OHCI_HCR, &ohci->regs->cmdstatus);
- temp = 30; /* ... allow extra time */
+ val = 30; /* ... allow extra time */
while ((ohci_readl (ohci, &ohci->regs->cmdstatus) & OHCI_HCR) != 0) {
- if (--temp == 0) {
+ if (--val == 0) {
spin_unlock_irq (&ohci->lock);
ohci_err (ohci, "USB HC reset timed out!\n");
return -1;
@@ -699,23 +699,23 @@ retry:
ohci_writel (ohci, mask, &ohci->regs->intrenable);
/* handle root hub init quirks ... */
- temp = roothub_a (ohci);
- temp &= ~(RH_A_PSM | RH_A_OCPM);
+ val = roothub_a (ohci);
+ val &= ~(RH_A_PSM | RH_A_OCPM);
if (ohci->flags & OHCI_QUIRK_SUPERIO) {
/* NSC 87560 and maybe others */
- temp |= RH_A_NOCP;
- temp &= ~(RH_A_POTPGT | RH_A_NPS);
- ohci_writel (ohci, temp, &ohci->regs->roothub.a);
+ val |= RH_A_NOCP;
+ val &= ~(RH_A_POTPGT | RH_A_NPS);
+ ohci_writel (ohci, val, &ohci->regs->roothub.a);
} else if ((ohci->flags & OHCI_QUIRK_AMD756) ||
(ohci->flags & OHCI_QUIRK_HUB_POWER)) {
/* hub power always on; required for AMD-756 and some
* Mac platforms. ganged overcurrent reporting, if any.
*/
- temp |= RH_A_NPS;
- ohci_writel (ohci, temp, &ohci->regs->roothub.a);
+ val |= RH_A_NPS;
+ ohci_writel (ohci, val, &ohci->regs->roothub.a);
}
ohci_writel (ohci, RH_HS_LPSC, &ohci->regs->roothub.status);
- ohci_writel (ohci, (temp & RH_A_NPS) ? 0 : RH_B_PPCM,
+ ohci_writel (ohci, (val & RH_A_NPS) ? 0 : RH_B_PPCM,
&ohci->regs->roothub.b);
// flush those writes
(void) ohci_readl (ohci, &ohci->regs->control);
@@ -724,7 +724,7 @@ retry:
spin_unlock_irq (&ohci->lock);
// POTPGT delay is bits 24-31, in 2 ms units.
- mdelay ((temp >> 23) & 0x1fe);
+ mdelay ((val >> 23) & 0x1fe);
hcd->state = HC_STATE_RUNNING;
if (quirk_zfmicro(ohci)) {
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] usb/host/ohci-hcd.c: fix sparse warnings
2009-04-22 20:18 ` H Hartley Sweeten
@ 2009-04-22 20:29 ` Greg KH
0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2009-04-22 20:29 UTC (permalink / raw)
To: H Hartley Sweeten; +Cc: linux-kernel
On Wed, Apr 22, 2009 at 04:18:59PM -0400, H Hartley Sweeten wrote:
> Fix sparse warnings in drivers/usb/host/ohci-hcd.c.
>
> Four of the following sparse warning are seen when building on
> ARM due do the macro raw_local_irq_save():
>
> warning: symbol 'temp' shadows an earlier one
>
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
>
> ---
>
> Patch is also attached in case of line-wrapping.
It was line-wrapped, but as your attachment was in base64 mode, it was
easier to hand edit the patch to fix the line-wrapping.
So, I think you still need to work a bit on your email client issues :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-04-22 21:03 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-16 2:04 [PATCH] usb/host/ohci-hcd.c: fix sparse warnings H Hartley Sweeten
2009-04-22 5:53 ` Greg KH
2009-04-22 17:39 ` H Hartley Sweeten
2009-04-22 17:42 ` Greg KH
2009-04-22 17:50 ` H Hartley Sweeten
2009-04-22 19:23 ` Greg KH
2009-04-22 20:18 ` H Hartley Sweeten
2009-04-22 20:29 ` Greg KH
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.