linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PATCH: cassini printk format warning
@ 2006-01-17 18:39 Alan Cox
  2006-01-17 20:58 ` David S. Miller
  2006-01-17 21:34 ` Alexey Dobriyan
  0 siblings, 2 replies; 5+ messages in thread
From: Alan Cox @ 2006-01-17 18:39 UTC (permalink / raw)
  To: akpm, linux-kernel, asun

compwb is u64, %lx is not u64.

Signed-off-by: Alan Cox <alan@redhat.com>

--- linux.vanilla-2.6.16-rc1/drivers/net/cassini.c	2006-01-17 15:36:31.000000000 +0000
+++ linux-2.6.16-rc1/drivers/net/cassini.c	2006-01-17 18:23:50.398383416 +0000
@@ -1925,7 +1925,7 @@
 	u64 compwb = le64_to_cpu(cp->init_block->tx_compwb);
 #endif
 	if (netif_msg_intr(cp))
-		printk(KERN_DEBUG "%s: tx interrupt, status: 0x%x, %lx\n",
+		printk(KERN_DEBUG "%s: tx interrupt, status: 0x%x, %llx\n",
 			cp->dev->name, status, compwb);
 	/* process all the rings */
 	for (ring = 0; ring < N_TX_RINGS; ring++) {


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

* Re: PATCH: cassini printk format warning
  2006-01-17 18:39 PATCH: cassini printk format warning Alan Cox
@ 2006-01-17 20:58 ` David S. Miller
  2006-01-17 21:34 ` Alexey Dobriyan
  1 sibling, 0 replies; 5+ messages in thread
From: David S. Miller @ 2006-01-17 20:58 UTC (permalink / raw)
  To: alan; +Cc: akpm, linux-kernel, asun

From: Alan Cox <alan@lxorguk.ukuu.org.uk>
Date: Tue, 17 Jan 2006 18:39:34 +0000

> compwb is u64, %lx is not u64.
> 
> Signed-off-by: Alan Cox <alan@redhat.com>

%llx is not u64 either, you have to use %llx and a "long long" cast to
get it right on all cases since several 64-bit platforms define u64 as
simply "unsigned long".

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

* Re: PATCH: cassini printk format warning
  2006-01-17 18:39 PATCH: cassini printk format warning Alan Cox
  2006-01-17 20:58 ` David S. Miller
@ 2006-01-17 21:34 ` Alexey Dobriyan
  2006-01-17 21:40   ` Andrew Morton
  1 sibling, 1 reply; 5+ messages in thread
From: Alexey Dobriyan @ 2006-01-17 21:34 UTC (permalink / raw)
  To: Alan Cox; +Cc: akpm, linux-kernel, asun

On Tue, Jan 17, 2006 at 06:39:34PM +0000, Alan Cox wrote:
> --- linux.vanilla-2.6.16-rc1/drivers/net/cassini.c
> +++ linux-2.6.16-rc1/drivers/net/cassini.c
> @@ -1925,7 +1925,7 @@
>  	u64 compwb = le64_to_cpu(cp->init_block->tx_compwb);
>  #endif
>  	if (netif_msg_intr(cp))
> -		printk(KERN_DEBUG "%s: tx interrupt, status: 0x%x, %lx\n",
> +		printk(KERN_DEBUG "%s: tx interrupt, status: 0x%x, %llx\n",
>  			cp->dev->name, status, compwb);

	"%llx", (unsigned long long)u64

is the warningless way on all archs.


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

* Re: PATCH: cassini printk format warning
  2006-01-17 21:34 ` Alexey Dobriyan
@ 2006-01-17 21:40   ` Andrew Morton
  2006-01-17 23:15     ` David S. Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2006-01-17 21:40 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: alan, linux-kernel, asun

Alexey Dobriyan <adobriyan@gmail.com> wrote:
>
> On Tue, Jan 17, 2006 at 06:39:34PM +0000, Alan Cox wrote:
> > --- linux.vanilla-2.6.16-rc1/drivers/net/cassini.c
> > +++ linux-2.6.16-rc1/drivers/net/cassini.c
> > @@ -1925,7 +1925,7 @@
> >  	u64 compwb = le64_to_cpu(cp->init_block->tx_compwb);
> >  #endif
> >  	if (netif_msg_intr(cp))
> > -		printk(KERN_DEBUG "%s: tx interrupt, status: 0x%x, %lx\n",
> > +		printk(KERN_DEBUG "%s: tx interrupt, status: 0x%x, %llx\n",
> >  			cp->dev->name, status, compwb);
> 
> 	"%llx", (unsigned long long)u64
> 
> is the warningless way on all archs.

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.15/2.6.15-mm4/broken-out/cassini-printk-fix.patch

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

* Re: PATCH: cassini printk format warning
  2006-01-17 21:40   ` Andrew Morton
@ 2006-01-17 23:15     ` David S. Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David S. Miller @ 2006-01-17 23:15 UTC (permalink / raw)
  To: akpm; +Cc: adobriyan, alan, linux-kernel, asun

From: Andrew Morton <akpm@osdl.org>
Date: Tue, 17 Jan 2006 13:40:10 -0800

> Alexey Dobriyan <adobriyan@gmail.com> wrote:
> > 	"%llx", (unsigned long long)u64
> > 
> > is the warningless way on all archs.
> 
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.15/2.6.15-mm4/broken-out/cassini-printk-fix.patch

I've added this to my tree, thanks Andrew.


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

end of thread, other threads:[~2006-01-17 23:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-17 18:39 PATCH: cassini printk format warning Alan Cox
2006-01-17 20:58 ` David S. Miller
2006-01-17 21:34 ` Alexey Dobriyan
2006-01-17 21:40   ` Andrew Morton
2006-01-17 23:15     ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).