Remove warnings compiling serial_xuartlite.c
PATCH 1/1 Remove warnings compiling serial_xuartlite.c
---serial_xuartlite.c: In function ?serial_putc?:
serial_xuartlite.c:59: warning: passing argument 1 of ?in_be32? makes pointer from integer without a cast serial_xuartlite.c:60: warning: passing argument 1 of ?out_be32? makes pointer from integer without a cast serial_xuartlite.c: In function ?serial_getc?:
serial_xuartlite.c:72: warning: passing argument 1 of ?in_be32? makes pointer from integer without a cast serial_xuartlite.c:73: warning: passing argument 1 of ?in_be32? makes pointer from integer without a cast serial_xuartlite.c: In function ?serial_tstc?:
serial_xuartlite.c:78: warning: passing argument 1 of ?in_be32? makes pointer from integer without a cast
Previous warnings corrected by this patch
drivers/serial/serial_xuartlite.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/serial/serial_xuartlite.c +3 -3
@@ -37,9 +37,9 @@#define SR_RX_FIFO_VALID_DATA 0x01/* data in receive FIFO */ #define SR_RX_FIFO_FULL 0x02/* receive FIFO full */ -#define UARTLITE_STATUS (CONFIG_SERIAL_BASE + STATUS_REG_OFFSET) -#define UARTLITE_TX_FIFO (CONFIG_SERIAL_BASE + TX_FIFO_OFFSET) -#define UARTLITE_RX_FIFO (CONFIG_SERIAL_BASE + RX_FIFO_OFFSET) +#define UARTLITE_STATUS (u32*)(CONFIG_SERIAL_BASE + STATUS_REG_OFFSET) +#define UARTLITE_TX_FIFO (u32*)(CONFIG_SERIAL_BASE + TX_FIFO_OFFSET) +#define UARTLITE_RX_FIFO (u32*)(CONFIG_SERIAL_BASE + RX_FIFO_OFFSET)int serial_init (void ) {
Signature · 1 line
1.5.6.2
PATCH 1/1 Remove warnings compiling serial_xuartlite.c
Quoted 5 lines · Ricardo Ribalda Delgado
drivers/serial/serial_xuartlite.c +0
-0
drivers/serial/serial_xuartlite.c line 42
Quoted 9 lines
drivers/serial/serial_xuartlite.c +3
-3@@ -37,9 +37,9 @@#define SR_RX_FIFO_VALID_DATA 0x01/* data in receive FIFO */ #define SR_RX_FIFO_FULL 0x02/* receive FIFO full */ -#define UARTLITE_STATUS (CONFIG_SERIAL_BASE + STATUS_REG_OFFSET) -#define UARTLITE_TX_FIFO (CONFIG_SERIAL_BASE + TX_FIFO_OFFSET) -#define UARTLITE_RX_FIFO (CONFIG_SERIAL_BASE + RX_FIFO_OFFSET) +#define UARTLITE_STATUS (u32*)(CONFIG_SERIAL_BASE + STATUS_REG_OFFSET) +#define UARTLITE_TX_FIFO (u32*)(CONFIG_SERIAL_BASE + TX_FIFO_OFFSET) +#define UARTLITE_RX_FIFO (u32*)(CONFIG_SERIAL_BASE + RX_FIFO_OFFSET)
Nak. Fix the code instead. These constants are correct and should not be pre-cast in the macro.
g.
PATCH 1/1 Remove warnings compiling serial_xuartlite.c
Casting on in_be32 not in MACROS
---serial_xuartlite.c: In function ?serial_putc?:
serial_xuartlite.c:59: warning: passing argument 1 of ?in_be32? makes pointer from integer without a cast serial_xuartlite.c:60: warning: passing argument 1 of ?out_be32? makes pointer from integer without a cast serial_xuartlite.c: In function ?serial_getc?:
serial_xuartlite.c:72: warning: passing argument 1 of ?in_be32? makes pointer from integer without a cast serial_xuartlite.c:73: warning: passing argument 1 of ?in_be32? makes pointer from integer without a cast serial_xuartlite.c: In function ?serial_tstc?:
serial_xuartlite.c:78: warning: passing argument 1 of ?in_be32? makes pointer from integer without a cast
Previous warnings corrected by this patch
drivers/serial/serial_xuartlite.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
drivers/serial/serial_xuartlite.c +5 -5
@@ -56,8 +56,8 @@ void serial_putc(const char c) {if (c =='\n' )serial_putc ('\r' ); -while (in_be32 (UARTLITE_STATUS ) &SR_TX_FIFO_FULL ); -out_be32 (UARTLITE_TX_FIFO , (unsigned char ) (c &0xff )); +while (in_be32 ((u32 *)UARTLITE_STATUS ) &SR_TX_FIFO_FULL ); +out_be32 ((u32 *)UARTLITE_TX_FIFO , (unsigned char ) (c &0xff )); }void serial_puts (const char * s)
@@ -69,13 +69,13 @@ void serial_puts(const char * s)int serial_getc (void ) { -while (!(in_be32 (UARTLITE_STATUS ) &SR_RX_FIFO_VALID_DATA )); -return in_be32 (UARTLITE_RX_FIFO ) &0xff ; +while (!(in_be32 ((u32 *)UARTLITE_STATUS ) &SR_RX_FIFO_VALID_DATA )); +return in_be32 ((u32 *)UARTLITE_RX_FIFO ) &0xff ; }int serial_tstc (void ) { -return (in_be32 (UARTLITE_STATUS ) &SR_RX_FIFO_VALID_DATA ); +return (in_be32 ((u32 *)UARTLITE_STATUS ) &SR_RX_FIFO_VALID_DATA ); }#endif /* CONFIG_MICROBLZE */
Signature · 1 line
1.5.6.2
PATCH 1/1 Remove warnings compiling serial_xuartlite.c
Quoted 3 lines · Ricardo Ribalda Delgado
Casting on
in_be32not in MACROSSigned-off-by Ricardo Ribalda Delgado <[email protected]>
Quoted 60 lines
---
serial_xuartlite.c: In function ?serial_putc?:
serial_xuartlite.c:59: warning: passing argument 1 of ?in_be32? makes pointer from integer without a cast serial_xuartlite.c:60: warning: passing argument 1 of ?out_be32? makes pointer from integer without a castserial_xuartlite.c: In function ?serial_getc?:
serial_xuartlite.c:72: warning: passing argument 1 of ?in_be32? makes pointer from integer without a cast serial_xuartlite.c:73: warning: passing argument 1 of ?in_be32? makes pointer from integer without a castserial_xuartlite.c: In function ?serial_tstc?:
serial_xuartlite.c:78: warning: passing argument 1 of ?in_be32? makes pointer from integer without a castPrevious warnings corrected by this patch
drivers/serial/serial_xuartlite.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)drivers/serial/serial_xuartlite.c +5
-5@@ -56,8 +56,8 @@ void serial_putc(const char c) {if (c =='\n' )serial_putc ('\r' ); -while (in_be32 (UARTLITE_STATUS ) &SR_TX_FIFO_FULL ); -out_be32 (UARTLITE_TX_FIFO , (unsigned char ) (c &0xff )); +while (in_be32 ((u32 *)UARTLITE_STATUS ) &SR_TX_FIFO_FULL ); +out_be32 ((u32 *)UARTLITE_TX_FIFO , (unsigned char ) (c &0xff )); }void serial_puts (const char * s)@@ -69,13 +69,13 @@ void serial_puts(const char * s)int serial_getc (void ) { -while (!(in_be32 (UARTLITE_STATUS ) &SR_RX_FIFO_VALID_DATA )); -return in_be32 (UARTLITE_RX_FIFO ) &0xff ; +while (!(in_be32 ((u32 *)UARTLITE_STATUS ) &SR_RX_FIFO_VALID_DATA )); +return in_be32 ((u32 *)UARTLITE_RX_FIFO ) &0xff ; }int serial_tstc (void ) { -return (in_be32 (UARTLITE_STATUS ) &SR_RX_FIFO_VALID_DATA ); +return (in_be32 ((u32 *)UARTLITE_STATUS ) &SR_RX_FIFO_VALID_DATA ); }#endif /* CONFIG_MICROBLZE */ Signature · 12 lines
1.5.6.2 ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ U-Boot-Users mailing list U-Boot-Users at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Wolfgang Denk
AppliedPATCH 1/1 Remove warnings compiling serial_xuartlite.c
In reply to Ricardo Ribalda DelgadoQuoted 4 lines · In message <[email protected]> you wrote:
Casting on
in_be32not in MACROSSigned-off-by Ricardo Ribalda Delgado <[email protected]>
Applied, thanks.
But please do not base64 encode plain text messages!!!
Best regards,
Wolfgang Denk
Signature · 4 lines
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 Der Dativ ist dem Genitiv sein Tod.
PATCH 1/1 Remove warnings compiling serial_xuartlite.c
Hello
I think that I created it using the git-format-patch and I did sent it using the git-send-email.... Any modifier that I should use?
Best regards
2008/7/20 Wolfgang Denk <[email protected]>:
Quoted 20 lines
Quoted 4 lines · In message <[email protected]> you wrote:
Casting on
in_be32not in MACROSSigned-off-by Ricardo Ribalda Delgado <[email protected]>Applied, thanks.
But please do not base64 encode plain text messages!!!
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 Der Dativ ist dem Genitiv sein Tod.
Signature · 2 lines
Ricardo Ribalda http://www.eps.uam.es/~rribalda/
PATCH 1/1 Remove warnings compiling serial_xuartlite.c
Quoted 2 lines · Ricardo Ribalda Delgado
I think that I created it using the git-format-patch and I did sent it using the git-send-email.... Any modifier that I should use?
I think the list engine at SourceForge converts the mail to base64 whenever it feels like it. So there's not much to do about it on your end except staying away from anything but 7-bit ascii.
Welcome to the seventies...
Haavard
PATCH 1/1 Remove warnings compiling serial_xuartlite.c
Quoted 9 lines · Haavard Skinnemoen
Quoted 2 lines · Ricardo Ribalda Delgado
I think that I created it using the git-format-patch and I did sent it using the git-send-email.... Any modifier that I should use?
I think the list engine at SourceForge converts the mail to base64 whenever it feels like it. So there's not much to do about it on your end except staying away from anything but 7-bit ascii.
Welcome to the seventies...
Ugh. Now I need to figure out how to make mutt talk 7-bit. blech.
But at least I now know that I'm not going crazy.
Thanks,
g.
PATCH 1/1 Remove warnings compiling serial_xuartlite.c
In reply to Haavard SkinnemoenQuoted 4 lines · In message <[email protected]> you wrote:
I think the list engine at SourceForge converts the mail to base64 whenever it feels like it. So there's not much to do about it on your end except staying away from anything but 7-bit ascii.
No, this is not correct. SF may be slow and doing a lot of painful things, but it does NOT convertany messages. That happens at the sender's end.
Best regards,
Wolfgang Denk
Signature · 4 lines
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 I used to be indecisive, now I'm not sure.
PATCH 1/1 Remove warnings compiling serial_xuartlite.c
Quoted 9 lines · Wolfgang Denk
Quoted 4 lines · In message <[email protected]> you wrote:
I think the list engine at SourceForge converts the mail to base64 whenever it feels like it. So there's not much to do about it on your end except staying away from anything but 7-bit ascii.
No, this is not correct. SF may be slow and doing a lot of painful things, but it does NOT convertany messages. That happens at the sender's end.
I double checked. I'm definitely not sending base64. My copy in my sent mailbox is in utf-8, not base64.
g.
PATCH 1/1 Remove warnings compiling serial_xuartlite.c
Quoted 7 lines · Grant Likely
Quoted 6 lines · Wolfgang Denk
Quoted 4 lines · In message <[email protected]> you wrote:
I think the list engine at SourceForge converts the mail to base64 whenever it feels like it. So there's not much to do about it on your end except staying away from anything but 7-bit ascii.
Quoted 6 lines
Quoted 3 lines
No, this is not correct. SF may be slow and doing a lot of painful things, but it does NOT convertany messages. That happens at the sender's end.
I double checked. I'm definitely not sending base64. My copy in my sent mailbox is in utf-8, not base64.
I've seen that before too. Wolfgang yelled at me for sending base64, so I checked with some people which I had Cc'ed directly, and they received it correctly. Only people who got it through the list received it base64-encoded.
So whatever it is that mangles the message, it's not a trivial problem and I think yelling at the sender is the wrong thing to do.
In any case, it's probably a good idea to include whoever you want to apply the patch in the recipient list.
Haavard