public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] Remove warnings compiling serial_xuartlite.c
@ 2008-07-16  1:01 Ricardo Ribalda Delgado
  2008-07-16 13:55 ` Grant Likely
  0 siblings, 1 reply; 11+ messages in thread
From: Ricardo Ribalda Delgado @ 2008-07-16  1:01 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
---
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(-)

diff --git a/drivers/serial/serial_xuartlite.c b/drivers/serial/serial_xuartlite.c
index 5c41a1c..2e6f096 100644
--- a/drivers/serial/serial_xuartlite.c
+++ b/drivers/serial/serial_xuartlite.c
@@ -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)
 {
-- 
1.5.6.2

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

* [U-Boot-Users] [PATCH] Remove warnings compiling serial_xuartlite.c
  2008-07-16  1:01 [U-Boot-Users] [PATCH] Remove warnings compiling serial_xuartlite.c Ricardo Ribalda Delgado
@ 2008-07-16 13:55 ` Grant Likely
  2008-07-16 14:22   ` Ricardo Ribalda Delgado
  0 siblings, 1 reply; 11+ messages in thread
From: Grant Likely @ 2008-07-16 13:55 UTC (permalink / raw)
  To: u-boot

On Wed, Jul 16, 2008 at 03:01:33AM +0200, Ricardo Ribalda Delgado wrote:
> diff --git a/drivers/serial/serial_xuartlite.c b/drivers/serial/serial_xuartlite.c
> index 5c41a1c..2e6f096 100644
> --- a/drivers/serial/serial_xuartlite.c
> +++ b/drivers/serial/serial_xuartlite.c
> @@ -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.

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

* [U-Boot-Users] [PATCH] Remove warnings compiling serial_xuartlite.c
  2008-07-16 13:55 ` Grant Likely
@ 2008-07-16 14:22   ` Ricardo Ribalda Delgado
  2008-07-16 14:26     ` Grant Likely
  2008-07-20 21:06     ` Wolfgang Denk
  0 siblings, 2 replies; 11+ messages in thread
From: Ricardo Ribalda Delgado @ 2008-07-16 14:22 UTC (permalink / raw)
  To: u-boot

Casting on in_be32 not in MACROS

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
---
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(-)

diff --git a/drivers/serial/serial_xuartlite.c b/drivers/serial/serial_xuartlite.c
index 5c41a1c..74546ce 100644
--- a/drivers/serial/serial_xuartlite.c
+++ b/drivers/serial/serial_xuartlite.c
@@ -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 */
-- 
1.5.6.2

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

* [U-Boot-Users] [PATCH] Remove warnings compiling serial_xuartlite.c
  2008-07-16 14:22   ` Ricardo Ribalda Delgado
@ 2008-07-16 14:26     ` Grant Likely
  2008-07-20 21:06     ` Wolfgang Denk
  1 sibling, 0 replies; 11+ messages in thread
From: Grant Likely @ 2008-07-16 14:26 UTC (permalink / raw)
  To: u-boot

On Wed, Jul 16, 2008 at 04:22:32PM +0200, Ricardo Ribalda Delgado wrote:
> Casting on in_be32 not in MACROS
> 
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>

Acked-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> 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(-)
> 
> diff --git a/drivers/serial/serial_xuartlite.c b/drivers/serial/serial_xuartlite.c
> index 5c41a1c..74546ce 100644
> --- a/drivers/serial/serial_xuartlite.c
> +++ b/drivers/serial/serial_xuartlite.c
> @@ -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 */
> -- 
> 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

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

* [U-Boot-Users] [PATCH] Remove warnings compiling serial_xuartlite.c
  2008-07-16 14:22   ` Ricardo Ribalda Delgado
  2008-07-16 14:26     ` Grant Likely
@ 2008-07-20 21:06     ` Wolfgang Denk
  2008-07-20 21:33       ` Ricardo Ribalda Delgado
  1 sibling, 1 reply; 11+ messages in thread
From: Wolfgang Denk @ 2008-07-20 21:06 UTC (permalink / raw)
  To: u-boot

In message <1216218152-16067-1-git-send-email-ricardo.ribalda@uam.es> you wrote:
> 
> Casting on in_be32 not in MACROS
> 
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>

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.

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

* [U-Boot-Users] [PATCH] Remove warnings compiling serial_xuartlite.c
  2008-07-20 21:06     ` Wolfgang Denk
@ 2008-07-20 21:33       ` Ricardo Ribalda Delgado
  2008-07-23  9:20         ` Haavard Skinnemoen
  0 siblings, 1 reply; 11+ messages in thread
From: Ricardo Ribalda Delgado @ 2008-07-20 21:33 UTC (permalink / raw)
  To: u-boot

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 <wd@denx.de>:
> In message <1216218152-16067-1-git-send-email-ricardo.ribalda@uam.es> you wrote:
>>
>> Casting on in_be32 not in MACROS
>>
>> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
>
> 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.
>



-- 
Ricardo Ribalda
http://www.eps.uam.es/~rribalda/

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

* [U-Boot-Users] [PATCH] Remove warnings compiling serial_xuartlite.c
  2008-07-20 21:33       ` Ricardo Ribalda Delgado
@ 2008-07-23  9:20         ` Haavard Skinnemoen
  2008-07-23 13:25           ` Grant Likely
  2008-07-24  3:18           ` Wolfgang Denk
  0 siblings, 2 replies; 11+ messages in thread
From: Haavard Skinnemoen @ 2008-07-23  9:20 UTC (permalink / raw)
  To: u-boot

"Ricardo Ribalda Delgado" <ricardo.ribalda@uam.es> wrote:
> 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

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

* [U-Boot-Users] [PATCH] Remove warnings compiling serial_xuartlite.c
  2008-07-23  9:20         ` Haavard Skinnemoen
@ 2008-07-23 13:25           ` Grant Likely
  2008-07-24  3:18           ` Wolfgang Denk
  1 sibling, 0 replies; 11+ messages in thread
From: Grant Likely @ 2008-07-23 13:25 UTC (permalink / raw)
  To: u-boot

On Wed, Jul 23, 2008 at 11:20:50AM +0200, Haavard Skinnemoen wrote:
> "Ricardo Ribalda Delgado" <ricardo.ribalda@uam.es> wrote:
> > 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.

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

* [U-Boot-Users] [PATCH] Remove warnings compiling serial_xuartlite.c
  2008-07-23  9:20         ` Haavard Skinnemoen
  2008-07-23 13:25           ` Grant Likely
@ 2008-07-24  3:18           ` Wolfgang Denk
  2008-07-24  5:07             ` Grant Likely
  1 sibling, 1 reply; 11+ messages in thread
From: Wolfgang Denk @ 2008-07-24  3:18 UTC (permalink / raw)
  To: u-boot

In message <20080723112050.26135b94@hskinnemo-gx745.norway.atmel.com> 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

-- 
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.

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

* [U-Boot-Users] [PATCH] Remove warnings compiling serial_xuartlite.c
  2008-07-24  3:18           ` Wolfgang Denk
@ 2008-07-24  5:07             ` Grant Likely
  2008-07-24  7:43               ` Haavard Skinnemoen
  0 siblings, 1 reply; 11+ messages in thread
From: Grant Likely @ 2008-07-24  5:07 UTC (permalink / raw)
  To: u-boot

On Thu, Jul 24, 2008 at 05:18:26AM +0200, Wolfgang Denk wrote:
> In message <20080723112050.26135b94@hskinnemo-gx745.norway.atmel.com> 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.

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

* [U-Boot-Users] [PATCH] Remove warnings compiling serial_xuartlite.c
  2008-07-24  5:07             ` Grant Likely
@ 2008-07-24  7:43               ` Haavard Skinnemoen
  0 siblings, 0 replies; 11+ messages in thread
From: Haavard Skinnemoen @ 2008-07-24  7:43 UTC (permalink / raw)
  To: u-boot

Grant Likely <grant.likely@secretlab.ca> wrote:
> On Thu, Jul 24, 2008 at 05:18:26AM +0200, Wolfgang Denk wrote:
> > In message <20080723112050.26135b94@hskinnemo-gx745.norway.atmel.com> 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.

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

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

end of thread, other threads:[~2008-07-24  7:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-16  1:01 [U-Boot-Users] [PATCH] Remove warnings compiling serial_xuartlite.c Ricardo Ribalda Delgado
2008-07-16 13:55 ` Grant Likely
2008-07-16 14:22   ` Ricardo Ribalda Delgado
2008-07-16 14:26     ` Grant Likely
2008-07-20 21:06     ` Wolfgang Denk
2008-07-20 21:33       ` Ricardo Ribalda Delgado
2008-07-23  9:20         ` Haavard Skinnemoen
2008-07-23 13:25           ` Grant Likely
2008-07-24  3:18           ` Wolfgang Denk
2008-07-24  5:07             ` Grant Likely
2008-07-24  7:43               ` Haavard Skinnemoen

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