public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "André Schwarz" <andre.schwarz@matrix-vision.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] mvbc_p board: build warnings
Date: Thu, 31 Jul 2008 19:34:39 +0200	[thread overview]
Message-ID: <4891F7AF.4030902@matrix-vision.de> (raw)
In-Reply-To: <20080731132612.9CA54248B9@gemini.denx.de>

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

  reply	other threads:[~2008-07-31 17:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-31 13:26 [U-Boot-Users] mvbc_p board: build warnings Wolfgang Denk
2008-07-31 17:34 ` André Schwarz [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4891F7AF.4030902@matrix-vision.de \
    --to=andre.schwarz@matrix-vision.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox