From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] serial: uartlite: Fix compilation warnings
Date: Sun, 23 Oct 2011 10:52:25 +0200 [thread overview]
Message-ID: <20111023085225.B9CCF18AE823@gemini.denx.de> (raw)
In-Reply-To: <1318933330-17883-2-git-send-email-monstr@monstr.eu>
Dear Michal Simek,
In message <1318933330-17883-2-git-send-email-monstr@monstr.eu> you wrote:
> Do not setup userial_ports array as const because
> in uartlite_serial_putc is out_be32 which can't write
> to tx_fifo if is const.
>
> Warning log:
> serial_xuartlite.c: In function 'uartlite_serial_putc':
> serial_xuartlite.c:60: warning: initialization discards qualifiers from pointer target type
> serial_xuartlite.c: In function 'uartlite_serial_getc':
> serial_xuartlite.c:78: warning: initialization discards qualifiers from pointer target type
> serial_xuartlite.c: In function 'uartlite_serial_tstc':
> serial_xuartlite.c:87: warning: initialization discards qualifiers from pointer target type
>
> Signed-off-by: Michal Simek <monstr@monstr.eu>
>
> ---
> There are several approach how to solve it in uartlite_serial_putc.
> 1. add retype to out_be32 function
> 2. retype in assignment
> 3. do not define userial_ports as const - used solution
Wouldn't 1. and 2. actually be wrong? If you need to write to the
struct, you must not declare it as constant?
> ---
> drivers/serial/serial_xuartlite.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
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
God made the integers; all else is the work of Man. - Kronecker
next prev parent reply other threads:[~2011-10-23 8:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-18 10:22 [U-Boot] [PATCH 1/2] microblaze: Fix strict-aliasign rules for in_be32 Michal Simek
2011-10-18 10:22 ` [U-Boot] [PATCH 2/2] serial: uartlite: Fix compilation warnings Michal Simek
2011-10-23 8:52 ` Wolfgang Denk [this message]
2011-10-18 10:26 ` [U-Boot] [PATCH 1/2] microblaze: Fix strict-aliasign rules for in_be32 Michal Simek
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=20111023085225.B9CCF18AE823@gemini.denx.de \
--to=wd@denx.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