public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] mvbc_p board: build warnings
@ 2008-07-31 13:26 Wolfgang Denk
  2008-07-31 17:34 ` André Schwarz
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2008-07-31 13:26 UTC (permalink / raw)
  To: u-boot

Hi,

I'm trying to clean up the build warnings for the mvbc_p board.
I've succeded with all but this one:

mvbc_p.c: In function 'mvbc_init_gpio':
mvbc_p.c:124: warning: dereferencing type-punned pointer will break strict-aliasing rules

This relates to the following code:

115         out_be32(&gpio->simple_ddr, SIMPLE_DDR);
116         out_be32(&gpio->simple_dvo, SIMPLE_DVO);
117         out_be32(&gpio->simple_ode, SIMPLE_ODE);
118         out_be32(&gpio->simple_gpioe, SIMPLE_GPIOEN);	<== volatile u8 outo_gpioe;
119
120         out_be32((u32*)&gpio->sint_ode, SINT_ODE);		<== volatile u8 sint_ode;
121         out_be32((u32*)&gpio->sint_ddr, SINT_DDR);		<== volatile u8 sint_ddr;
122         out_be32((u32*)&gpio->sint_dvo, SINT_DVO);		<== volatile u8 sint_dvo;
123         out_be32((u32*)&gpio->sint_inten, SINT_INTEN);	<== volatile u8 sint_inten;
124         out_be32((u32*)&gpio->sint_itype, SINT_ITYPE);	<== volatile u16 sint_itype;
125         out_be32((u32*)&gpio->sint_gpioe, SINT_GPIOEN);	<== volatile u8 outo_gpioe;


I don't know why the warning is only issued for the  "u16"  type  and
not  also for the "u8" ones, but anyway: Is the casting to "u32*" and
using out_be32() here really correct?

I would expect to see some out_be8() and one out_be16() here?

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
"In Christianity neither morality nor religion come into contact with
reality@any point."                          - Friedrich Nietzsche

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

* [U-Boot-Users] mvbc_p board: build warnings
  2008-07-31 13:26 [U-Boot-Users] mvbc_p board: build warnings Wolfgang Denk
@ 2008-07-31 17:34 ` André Schwarz
  2008-08-12 12:06   ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: André Schwarz @ 2008-07-31 17:34 UTC (permalink / raw)
  To: u-boot

Wolfgang,

thanks - I'll fix it on monday/tuesday and send a patch after testing 
the -rc2.

regards,
Andr?

Wolfgang Denk schrieb:
> Hi,
> 
> I'm trying to clean up the build warnings for the mvbc_p board.
> I've succeded with all but this one:
> 
> mvbc_p.c: In function 'mvbc_init_gpio':
> mvbc_p.c:124: warning: dereferencing type-punned pointer will break strict-aliasing rules
> 
> This relates to the following code:
> 
> 115         out_be32(&gpio->simple_ddr, SIMPLE_DDR);
> 116         out_be32(&gpio->simple_dvo, SIMPLE_DVO);
> 117         out_be32(&gpio->simple_ode, SIMPLE_ODE);
> 118         out_be32(&gpio->simple_gpioe, SIMPLE_GPIOEN);	<== volatile u8 outo_gpioe;
> 119
> 120         out_be32((u32*)&gpio->sint_ode, SINT_ODE);		<== volatile u8 sint_ode;
> 121         out_be32((u32*)&gpio->sint_ddr, SINT_DDR);		<== volatile u8 sint_ddr;
> 122         out_be32((u32*)&gpio->sint_dvo, SINT_DVO);		<== volatile u8 sint_dvo;
> 123         out_be32((u32*)&gpio->sint_inten, SINT_INTEN);	<== volatile u8 sint_inten;
> 124         out_be32((u32*)&gpio->sint_itype, SINT_ITYPE);	<== volatile u16 sint_itype;
> 125         out_be32((u32*)&gpio->sint_gpioe, SINT_GPIOEN);	<== volatile u8 outo_gpioe;
> 
> 
> I don't know why the warning is only issued for the  "u16"  type  and
> not  also for the "u8" ones, but anyway: Is the casting to "u32*" and
> using out_be32() here really correct?
> 
> I would expect to see some out_be8() and one out_be16() here?
> 
> Best regards,
> 
> Wolfgang Denk
> 


MATRIX VISION GmbH, Talstra?e 16, DE-71570 Oppenweiler  - Registergericht: Amtsgericht Stuttgart, HRB 271090
Gesch?ftsf?hrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner

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

* [U-Boot-Users] mvbc_p board: build warnings
  2008-07-31 17:34 ` André Schwarz
@ 2008-08-12 12:06   ` Wolfgang Denk
  2008-08-12 15:38     ` André Schwarz
  2008-08-18 10:02     ` [U-Boot] [PATCH]: fix mvbc_p board " Andre Schwarz
  0 siblings, 2 replies; 6+ messages in thread
From: Wolfgang Denk @ 2008-08-12 12:06 UTC (permalink / raw)
  To: u-boot

Dear Andr?,

in message <4891F7AF.4030902@matrix-vision.de> you wrote:
> 
> thanks - I'll fix it on monday/tuesday and send a patch after testing 
> the -rc2.

Maybe I have missed your patch?

This problem is still open!

I have to decide if you fix this now, i. e. wait with the 1.3.4
release, or later.

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
While most peoples' opinions change, the conviction of their correct-
ness never does.

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

* [U-Boot-Users] mvbc_p board: build warnings
  2008-08-12 12:06   ` Wolfgang Denk
@ 2008-08-12 15:38     ` André Schwarz
  2008-08-18 10:02     ` [U-Boot] [PATCH]: fix mvbc_p board " Andre Schwarz
  1 sibling, 0 replies; 6+ messages in thread
From: André Schwarz @ 2008-08-12 15:38 UTC (permalink / raw)
  To: u-boot

Wolfgang,

sorry for this - it's been quite a mess before my holiday.

I'll be back in office next week and won't be able to fix it before mid 
of next week.

I have absolutely no problem if you do not wait for the patch.
Maybe there will be other changes also ...


regards,
Andr?

Wolfgang Denk wrote:
> Dear Andr?,
>
> in message <4891F7AF.4030902@matrix-vision.de> you wrote:
>   
>> thanks - I'll fix it on monday/tuesday and send a patch after testing 
>> the -rc2.
>>     
>
> Maybe I have missed your patch?
>
> This problem is still open!
>
> I have to decide if you fix this now, i. e. wait with the 1.3.4
> release, or later.
>
> Best regards,
>
> Wolfgang Denk
>
>   



MATRIX VISION GmbH, Talstra?e 16, DE-71570 Oppenweiler  - Registergericht: Amtsgericht Stuttgart, HRB 271090
Gesch?ftsf?hrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080812/9a8cc143/attachment.htm 

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

* [U-Boot] [PATCH]: fix mvbc_p board build warnings
  2008-08-12 12:06   ` Wolfgang Denk
  2008-08-12 15:38     ` André Schwarz
@ 2008-08-18 10:02     ` Andre Schwarz
  2008-08-20 23:52       ` Wolfgang Denk
  1 sibling, 1 reply; 6+ messages in thread
From: Andre Schwarz @ 2008-08-18 10:02 UTC (permalink / raw)
  To: u-boot

fix build warnings @ mvBC-P board by using correct types, i.e. change
out_be32 to out_be16 and out_8 accordingly.

Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de>
---



Wolfgang,

sorry for the delay - I've been out of office.

regards,
Andre



MATRIX VISION GmbH, Talstra?e 16, DE-71570 Oppenweiler  - Registergericht: Amtsgericht Stuttgart, HRB 271090
Gesch?ftsf?hrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_mvbc_p_types
Url: http://lists.denx.de/pipermail/u-boot/attachments/20080818/3d7753af/attachment.txt 

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

* [U-Boot] [PATCH]: fix mvbc_p board build warnings
  2008-08-18 10:02     ` [U-Boot] [PATCH]: fix mvbc_p board " Andre Schwarz
@ 2008-08-20 23:52       ` Wolfgang Denk
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2008-08-20 23:52 UTC (permalink / raw)
  To: u-boot

Dear Andre Schwarz,

In message <48A948CB.2010007@matrix-vision.de> you wrote:
> This is a multi-part message in MIME format.
> --------------020103080003000708050406
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: 7bit
> 
> fix build warnings @ mvBC-P board by using correct types, i.e. change
> out_be32 to out_be16 and out_8 accordingly.
> 
> Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de>

Applied, 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
Respect is a rational process
	-- McCoy, "The Galileo Seven", stardate 2822.3

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

end of thread, other threads:[~2008-08-20 23:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-31 13:26 [U-Boot-Users] mvbc_p board: build warnings Wolfgang Denk
2008-07-31 17:34 ` André Schwarz
2008-08-12 12:06   ` Wolfgang Denk
2008-08-12 15:38     ` André Schwarz
2008-08-18 10:02     ` [U-Boot] [PATCH]: fix mvbc_p board " Andre Schwarz
2008-08-20 23:52       ` Wolfgang Denk

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