All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] dm: sparc: net: Fixup greth compile warnings
Date: Fri, 14 Sep 2012 12:17:36 +0200	[thread overview]
Message-ID: <201209141217.36777.marex@denx.de> (raw)
In-Reply-To: <1343412274-21500-1-git-send-email-marex@denx.de>

Hi Tom,

can you pick these three sparc things by hand please?

> greth.c: In function ?greth_recv?:
> greth.c:507:3: warning: format ?%lx? expects argument of type ?long
> unsigned int?, but argument 2 has type ?unsigned int? [-Wformat]
> greth.c:507:3: warning: format ?%lx? expects argument of type ?long
> unsigned int?, but argument 3 has type ?unsigned int? [-Wformat]
> greth.c:541:6: warning: pointer targets in assignment differ in signedness
> [-Wpointer-sign] greth.c: In function ?greth_initialize?:
> greth.c:623:2: warning: format ?%lx? expects argument of type ?long
> unsigned int?, but argument 2 has type ?struct greth_regs *? [-Wformat]
> greth.c:655:3: warning: format ?%x? expects argument of type ?unsigned
> int?, but argument 2 has type ?struct greth_regs *? [-Wformat]
> greth.c:684:2: warning: format ?%x? expects argument of type ?unsigned
> int?, but argument 2 has type ?struct greth_regs *? [-Wformat]
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Joe Hershberger <joe.hershberger@gmail.com>
> Cc: Daniel Hellstrom <daniel@gaisler.com>
> Cc: u-boot-dm at lists.denx.de
> ---
>  drivers/net/greth.c |   10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/greth.c b/drivers/net/greth.c
> index 08206c8..3103a74 100644
> --- a/drivers/net/greth.c
> +++ b/drivers/net/greth.c
> @@ -483,7 +483,7 @@ int greth_recv(struct eth_device *dev)
>  	greth_regs *regs = greth->regs;
>  	greth_bd *rxbd;
>  	unsigned int status, len = 0, bad;
> -	unsigned char *d;
> +	char *d;
>  	int enable = 0;
>  	int i;
> 
> @@ -504,7 +504,7 @@ int greth_recv(struct eth_device *dev)
>  			goto done;
>  		}
> 
> -		debug("greth_recv: packet 0x%lx, 0x%lx, len: %d\n",
> +		debug("greth_recv: packet 0x%x, 0x%x, len: %d\n",
>  		       (unsigned int)rxbd, status, status & GRETH_BD_LEN);
> 
>  		/* Check status for errors.
> @@ -620,7 +620,7 @@ int greth_initialize(bd_t * bis)
> 
>  	greth->regs = (greth_regs *) apbdev.address;
>  	greth->irq = apbdev.irq;
> -	debug("Found GRETH at 0x%lx, irq %d\n", greth->regs, greth->irq);
> +	debug("Found GRETH at %p, irq %d\n", greth->regs, greth->irq);
>  	dev->priv = (void *)greth;
>  	dev->iobase = (unsigned int)greth->regs;
>  	dev->init = greth_init;
> @@ -652,7 +652,7 @@ int greth_initialize(bd_t * bis)
>  	/* initiate PHY, select speed/duplex depending on connected PHY */
>  	if (greth_init_phy(greth, bis)) {
>  		/* Failed to init PHY (timedout) */
> -		debug("GRETH[0x%08x]: Failed to init PHY\n", greth->regs);
> +		debug("GRETH[%p]: Failed to init PHY\n", greth->regs);
>  		return -1;
>  	}
> 
> @@ -681,6 +681,6 @@ int greth_initialize(bd_t * bis)
>  	/* set and remember MAC address */
>  	greth_set_hwaddr(greth, addr);
> 
> -	debug("GRETH[0x%08x]: Initialized successfully\n", greth->regs);
> +	debug("GRETH[%p]: Initialized successfully\n", greth->regs);
>  	return 0;
>  }

Best regards,
Marek Vasut

  parent reply	other threads:[~2012-09-14 10:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-27 18:04 [U-Boot] [PATCH 1/3] dm: sparc: net: Fixup greth compile warnings Marek Vasut
2012-07-27 18:04 ` [U-Boot] [PATCH 2/3] dm: sparc: common: Fixup cmd_bdinfo warnings Marek Vasut
2012-09-18 19:04   ` [U-Boot] [U-Boot, " Tom Rini
2012-07-27 18:04 ` [U-Boot] [PATCH 3/3] dm: sparc: Fixup the compile warnings in sparc code Marek Vasut
2012-09-18 19:04   ` [U-Boot] [U-Boot, " Tom Rini
2012-09-14 10:17 ` Marek Vasut [this message]
2012-09-18 19:03 ` [U-Boot] [U-Boot, 1/3] dm: sparc: net: Fixup greth compile warnings Tom Rini
2012-09-18 19:23   ` Marek Vasut

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=201209141217.36777.marex@denx.de \
    --to=marex@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.