public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 02/19] usbdev.c: Fix GCC 4.6 build warnings
@ 2011-11-15 18:01 Stefan Roese
  2011-11-15 23:01 ` Mike Frysinger
  2011-12-09  9:31 ` Wolfgang Denk
  0 siblings, 2 replies; 6+ messages in thread
From: Stefan Roese @ 2011-11-15 18:01 UTC (permalink / raw)
  To: u-boot

Fix:
usbdev.c: In function 'process_endpoints':
usbdev.c:29:12: warning: variable 'temp1' set but not used [-Wunused-but-set-variable]
usbdev.c:29:6: warning: variable 'temp' set but not used [-Wunused-but-set-variable]

Signed-off-by: Stefan Roese <sr@denx.de>
---
 arch/powerpc/cpu/ppc4xx/usbdev.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/cpu/ppc4xx/usbdev.c b/arch/powerpc/cpu/ppc4xx/usbdev.c
index fe398af..fc7da89 100644
--- a/arch/powerpc/cpu/ppc4xx/usbdev.c
+++ b/arch/powerpc/cpu/ppc4xx/usbdev.c
@@ -26,7 +26,6 @@ void process_endpoints(unsigned short usb2d0_intrin)
 	struct devrequest setup_packet;
 	unsigned int *setup_packet_pt;
 	unsigned char *packet_pt = NULL;
-	int temp, temp1;
 
 	int i;
 
@@ -44,8 +43,6 @@ void process_endpoints(unsigned short usb2d0_intrin)
 		/*copy packet */
 		setup_packet_pt[0] = *(unsigned int *)USB2D0_FIFO_0;
 		setup_packet_pt[1] = *(unsigned int *)USB2D0_FIFO_0;
-		temp = *(unsigned int *)USB2D0_FIFO_0;
-		temp1 = *(unsigned int *)USB2D0_FIFO_0;
 
 		/*do some swapping */
 		setup_packet.value = swap_16(setup_packet.value);
-- 
1.7.7.3

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

* [U-Boot] [PATCH 02/19] usbdev.c: Fix GCC 4.6 build warnings
  2011-11-15 18:01 [U-Boot] [PATCH 02/19] usbdev.c: Fix GCC 4.6 build warnings Stefan Roese
@ 2011-11-15 23:01 ` Mike Frysinger
  2011-11-16  2:26   ` Marek Vasut
  2011-12-09  9:31 ` Wolfgang Denk
  1 sibling, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2011-11-15 23:01 UTC (permalink / raw)
  To: u-boot

On Tuesday 15 November 2011 13:01:52 Stefan Roese wrote:
> --- a/arch/powerpc/cpu/ppc4xx/usbdev.c
> +++ b/arch/powerpc/cpu/ppc4xx/usbdev.c
>
> -	int temp, temp1;
> ...
>  		/*copy packet */
>  		setup_packet_pt[0] = *(unsigned int *)USB2D0_FIFO_0;
>  		setup_packet_pt[1] = *(unsigned int *)USB2D0_FIFO_0;
> -		temp = *(unsigned int *)USB2D0_FIFO_0;
> -		temp1 = *(unsigned int *)USB2D0_FIFO_0;

this seems to be treading into possible ugly volatile area ... perhaps best if 
this was acked/tested by someone with actual hardware first ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111115/d4832240/attachment.pgp 

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

* [U-Boot] [PATCH 02/19] usbdev.c: Fix GCC 4.6 build warnings
  2011-11-15 23:01 ` Mike Frysinger
@ 2011-11-16  2:26   ` Marek Vasut
  0 siblings, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2011-11-16  2:26 UTC (permalink / raw)
  To: u-boot

> On Tuesday 15 November 2011 13:01:52 Stefan Roese wrote:
> > --- a/arch/powerpc/cpu/ppc4xx/usbdev.c
> > +++ b/arch/powerpc/cpu/ppc4xx/usbdev.c
> > 
> > -	int temp, temp1;
> > ...
> > 
> >  		/*copy packet */
> >  		setup_packet_pt[0] = *(unsigned int *)USB2D0_FIFO_0;
> >  		setup_packet_pt[1] = *(unsigned int *)USB2D0_FIFO_0;
> > 
> > -		temp = *(unsigned int *)USB2D0_FIFO_0;
> > -		temp1 = *(unsigned int *)USB2D0_FIFO_0;
> 
> this seems to be treading into possible ugly volatile area ... perhaps best
> if this was acked/tested by someone with actual hardware first ...
> -mike

My words definitelly ... maybe replace with in_be32() ? It seems very 
suspicious, as if there was a reason for this access. Like you need to do more 
accesses to the fifo to clean up some trailing crud.

M

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

* [U-Boot] [PATCH 02/19] usbdev.c: Fix GCC 4.6 build warnings
  2011-11-15 18:01 [U-Boot] [PATCH 02/19] usbdev.c: Fix GCC 4.6 build warnings Stefan Roese
  2011-11-15 23:01 ` Mike Frysinger
@ 2011-12-09  9:31 ` Wolfgang Denk
  2011-12-09  9:44   ` Stefan Roese
  1 sibling, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2011-12-09  9:31 UTC (permalink / raw)
  To: u-boot

Dear Stefan Roese,

In message <1321380112-6210-1-git-send-email-sr@denx.de> you wrote:
> Fix:
> usbdev.c: In function 'process_endpoints':
> usbdev.c:29:12: warning: variable 'temp1' set but not used [-Wunused-but-set-variable]
> usbdev.c:29:6: warning: variable 'temp' set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: Stefan Roese <sr@denx.de>
...
> @@ -44,8 +43,6 @@ void process_endpoints(unsigned short usb2d0_intrin)
>  		/*copy packet */
>  		setup_packet_pt[0] = *(unsigned int *)USB2D0_FIFO_0;
>  		setup_packet_pt[1] = *(unsigned int *)USB2D0_FIFO_0;
> -		temp = *(unsigned int *)USB2D0_FIFO_0;
> -		temp1 = *(unsigned int *)USB2D0_FIFO_0;

It seems we agree that these reads from the FIFO registers may
actually be important for proper operation. Are you planning to
submit an updated, improved patch?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Is truth not truth for all?
	-- Natira, "For the World is Hollow and I have Touched
		   the Sky", stardate 5476.4.

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

* [U-Boot] [PATCH 02/19] usbdev.c: Fix GCC 4.6 build warnings
  2011-12-09  9:31 ` Wolfgang Denk
@ 2011-12-09  9:44   ` Stefan Roese
  2011-12-09 11:18     ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Roese @ 2011-12-09  9:44 UTC (permalink / raw)
  To: u-boot

Hi Wolfgang,

On Friday 09 December 2011 10:31:01 Wolfgang Denk wrote:
> In message <1321380112-6210-1-git-send-email-sr@denx.de> you wrote:
> > Fix:
> > usbdev.c: In function 'process_endpoints':
> > usbdev.c:29:12: warning: variable 'temp1' set but not used
> > [-Wunused-but-set-variable] usbdev.c:29:6: warning: variable 'temp' set
> > but not used [-Wunused-but-set-variable]
> > 
> > Signed-off-by: Stefan Roese <sr@denx.de>
> 
> ...
> 
> > @@ -44,8 +43,6 @@ void process_endpoints(unsigned short usb2d0_intrin)
> > 
> >  		/*copy packet */
> >  		setup_packet_pt[0] = *(unsigned int *)USB2D0_FIFO_0;
> >  		setup_packet_pt[1] = *(unsigned int *)USB2D0_FIFO_0;
> > 
> > -		temp = *(unsigned int *)USB2D0_FIFO_0;
> > -		temp1 = *(unsigned int *)USB2D0_FIFO_0;
> 
> It seems we agree that these reads from the FIFO registers may
> actually be important for proper operation. Are you planning to
> submit an updated, improved patch?

This file has been removed with patch ce2acd371c4eee36e55d706a181361c25ebfe160 
already in mainline.

Best regards,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

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

* [U-Boot] [PATCH 02/19] usbdev.c: Fix GCC 4.6 build warnings
  2011-12-09  9:44   ` Stefan Roese
@ 2011-12-09 11:18     ` Wolfgang Denk
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2011-12-09 11:18 UTC (permalink / raw)
  To: u-boot

Dear Stefan Roese,

In message <201112091044.03681.sr@denx.de> you wrote:
> 
> This file has been removed with patch ce2acd371c4eee36e55d706a181361c25ebfe160 
> already in mainline.

Ah, right.  Even better :-)

Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Never underestimate the power of human stupidity  when  it  comes  to
using technology they don't understand.

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

end of thread, other threads:[~2011-12-09 11:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-15 18:01 [U-Boot] [PATCH 02/19] usbdev.c: Fix GCC 4.6 build warnings Stefan Roese
2011-11-15 23:01 ` Mike Frysinger
2011-11-16  2:26   ` Marek Vasut
2011-12-09  9:31 ` Wolfgang Denk
2011-12-09  9:44   ` Stefan Roese
2011-12-09 11:18     ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox