netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch for 2.6.27? 2/2] drivers/net/netxen/netxen_nic_hw.c: fix printk warnings
@ 2008-07-30 19:50 akpm
  2008-08-01  6:19 ` Simon Horman
  2008-08-07  6:24 ` Jeff Garzik
  0 siblings, 2 replies; 6+ messages in thread
From: akpm @ 2008-07-30 19:50 UTC (permalink / raw)
  To: jeff; +Cc: netdev, akpm

From: Andrew Morton <akpm@linux-foundation.org>

drivers/net/netxen/netxen_nic_hw.c: In function 'netxen_nic_pci_mem_read_direct':
drivers/net/netxen/netxen_nic_hw.c:1414: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'u64'
drivers/net/netxen/netxen_nic_hw.c: In function 'netxen_nic_pci_mem_write_direct':
drivers/net/netxen/netxen_nic_hw.c:1487: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'u64'

You don't know what type was used for u64 hence they cannot be printed without
casting.

Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/net/netxen/netxen_nic_hw.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff -puN drivers/net/netxen/netxen_nic_hw.c~drivers-net-netxen-netxen_nic_hwc-fix-printk-warnings drivers/net/netxen/netxen_nic_hw.c
--- a/drivers/net/netxen/netxen_nic_hw.c~drivers-net-netxen-netxen_nic_hwc-fix-printk-warnings
+++ a/drivers/net/netxen/netxen_nic_hw.c
@@ -1411,7 +1411,8 @@ static int netxen_nic_pci_mem_read_direc
 		(netxen_nic_pci_is_same_window(adapter, off+size-1) == 0)) {
 		write_unlock_irqrestore(&adapter->adapter_lock, flags);
 		printk(KERN_ERR "%s out of bound pci memory access. "
-			"offset is 0x%llx\n", netxen_nic_driver_name, off);
+			"offset is 0x%llx\n", netxen_nic_driver_name,
+			(unsigned long long)off);
 		return -1;
 	}
 
@@ -1484,7 +1485,8 @@ netxen_nic_pci_mem_write_direct(struct n
 		(netxen_nic_pci_is_same_window(adapter, off+size-1) == 0)) {
 		write_unlock_irqrestore(&adapter->adapter_lock, flags);
 		printk(KERN_ERR "%s out of bound pci memory access. "
-			"offset is 0x%llx\n", netxen_nic_driver_name, off);
+			"offset is 0x%llx\n", netxen_nic_driver_name,
+			(unsigned long long)off);
 		return -1;
 	}
 
_

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

* Re: [patch for 2.6.27? 2/2] drivers/net/netxen/netxen_nic_hw.c: fix printk warnings
  2008-07-30 19:50 [patch for 2.6.27? 2/2] drivers/net/netxen/netxen_nic_hw.c: fix printk warnings akpm
@ 2008-08-01  6:19 ` Simon Horman
  2008-08-01  6:28   ` Andrew Morton
  2008-08-07  6:24 ` Jeff Garzik
  1 sibling, 1 reply; 6+ messages in thread
From: Simon Horman @ 2008-08-01  6:19 UTC (permalink / raw)
  To: akpm; +Cc: jeff, netdev

On Wed, Jul 30, 2008 at 12:50:12PM -0700, akpm@linux-foundation.org wrote:
> From: Andrew Morton <akpm@linux-foundation.org>
> 
> drivers/net/netxen/netxen_nic_hw.c: In function 'netxen_nic_pci_mem_read_direct':
> drivers/net/netxen/netxen_nic_hw.c:1414: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'u64'
> drivers/net/netxen/netxen_nic_hw.c: In function 'netxen_nic_pci_mem_write_direct':
> drivers/net/netxen/netxen_nic_hw.c:1487: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'u64'
> 
> You don't know what type was used for u64 hence they cannot be printed without
> casting.

Good grief, that is a sledgehammer to crack an egg.
Pity it is the only tool available :-(

-- 
Horms


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

* Re: [patch for 2.6.27? 2/2] drivers/net/netxen/netxen_nic_hw.c: fix printk warnings
  2008-08-01  6:19 ` Simon Horman
@ 2008-08-01  6:28   ` Andrew Morton
  2008-08-01  6:55     ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2008-08-01  6:28 UTC (permalink / raw)
  To: Simon Horman; +Cc: jeff, netdev

On Fri, 1 Aug 2008 16:19:53 +1000 Simon Horman <horms@verge.net.au> wrote:

> On Wed, Jul 30, 2008 at 12:50:12PM -0700, akpm@linux-foundation.org wrote:
> > From: Andrew Morton <akpm@linux-foundation.org>
> > 
> > drivers/net/netxen/netxen_nic_hw.c: In function 'netxen_nic_pci_mem_read_direct':
> > drivers/net/netxen/netxen_nic_hw.c:1414: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'u64'
> > drivers/net/netxen/netxen_nic_hw.c: In function 'netxen_nic_pci_mem_write_direct':
> > drivers/net/netxen/netxen_nic_hw.c:1487: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'u64'
> > 
> > You don't know what type was used for u64 hence they cannot be printed without
> > casting.
> 
> Good grief, that is a sledgehammer to crack an egg.
> Pity it is the only tool available :-(

The sad thing is that if/when we get around to converting all 64-bit
architectures to `long long', we then get to delete all these casts.

Oh well, at least they're easy to grep for.

I wonder who was the first 64-bit bright spark who decided to use `long'.

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

* Re: [patch for 2.6.27? 2/2] drivers/net/netxen/netxen_nic_hw.c: fix printk warnings
  2008-08-01  6:28   ` Andrew Morton
@ 2008-08-01  6:55     ` David Miller
  2008-08-01  7:01       ` Andrew Morton
  0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2008-08-01  6:55 UTC (permalink / raw)
  To: akpm; +Cc: horms, jeff, netdev

From: Andrew Morton <akpm@linux-foundation.org>
Date: Thu, 31 Jul 2008 23:28:09 -0700

> I wonder who was the first 64-bit bright spark who decided to use `long'.

/me hides :)

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

* Re: [patch for 2.6.27? 2/2] drivers/net/netxen/netxen_nic_hw.c: fix printk warnings
  2008-08-01  6:55     ` David Miller
@ 2008-08-01  7:01       ` Andrew Morton
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Morton @ 2008-08-01  7:01 UTC (permalink / raw)
  To: David Miller; +Cc: horms, jeff, netdev

On Thu, 31 Jul 2008 23:55:01 -0700 (PDT) David Miller <davem@davemloft.net> wrote:

> From: Andrew Morton <akpm@linux-foundation.org>
> Date: Thu, 31 Jul 2008 23:28:09 -0700
> 
> > I wonder who was the first 64-bit bright spark who decided to use `long'.
> 
> /me hides :)

y'know, I actually did type "bright sparc".  Now I wish I hadn't fixed it.

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

* Re: [patch for 2.6.27? 2/2] drivers/net/netxen/netxen_nic_hw.c: fix printk warnings
  2008-07-30 19:50 [patch for 2.6.27? 2/2] drivers/net/netxen/netxen_nic_hw.c: fix printk warnings akpm
  2008-08-01  6:19 ` Simon Horman
@ 2008-08-07  6:24 ` Jeff Garzik
  1 sibling, 0 replies; 6+ messages in thread
From: Jeff Garzik @ 2008-08-07  6:24 UTC (permalink / raw)
  To: akpm; +Cc: netdev

akpm@linux-foundation.org wrote:
> From: Andrew Morton <akpm@linux-foundation.org>
> 
> drivers/net/netxen/netxen_nic_hw.c: In function 'netxen_nic_pci_mem_read_direct':
> drivers/net/netxen/netxen_nic_hw.c:1414: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'u64'
> drivers/net/netxen/netxen_nic_hw.c: In function 'netxen_nic_pci_mem_write_direct':
> drivers/net/netxen/netxen_nic_hw.c:1487: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'u64'
> 
> You don't know what type was used for u64 hence they cannot be printed without
> casting.
> 
> Cc: Jeff Garzik <jeff@garzik.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  drivers/net/netxen/netxen_nic_hw.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff -puN drivers/net/netxen/netxen_nic_hw.c~drivers-net-netxen-netxen_nic_hwc-fix-printk-warnings drivers/net/netxen/netxen_nic_hw.c
> --- a/drivers/net/netxen/netxen_nic_hw.c~drivers-net-netxen-netxen_nic_hwc-fix-printk-warnings
> +++ a/drivers/net/netxen/netxen_nic_hw.c
> @@ -1411,7 +1411,8 @@ static int netxen_nic_pci_mem_read_direc
>  		(netxen_nic_pci_is_same_window(adapter, off+size-1) == 0)) {
>  		write_unlock_irqrestore(&adapter->adapter_lock, flags);
>  		printk(KERN_ERR "%s out of bound pci memory access. "
> -			"offset is 0x%llx\n", netxen_nic_driver_name, off);
> +			"offset is 0x%llx\n", netxen_nic_driver_name,
> +			(unsigned long long)off);
>  		return -1;
>  	}
>  
> @@ -1484,7 +1485,8 @@ netxen_nic_pci_mem_write_direct(struct n
>  		(netxen_nic_pci_is_same_window(adapter, off+size-1) == 0)) {
>  		write_unlock_irqrestore(&adapter->adapter_lock, flags);
>  		printk(KERN_ERR "%s out of bound pci memory access. "
> -			"offset is 0x%llx\n", netxen_nic_driver_name, off);
> +			"offset is 0x%llx\n", netxen_nic_driver_name,
> +			(unsigned long long)off);
>  		return -1;
>  	}
>  
> _

applied



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

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

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-30 19:50 [patch for 2.6.27? 2/2] drivers/net/netxen/netxen_nic_hw.c: fix printk warnings akpm
2008-08-01  6:19 ` Simon Horman
2008-08-01  6:28   ` Andrew Morton
2008-08-01  6:55     ` David Miller
2008-08-01  7:01       ` Andrew Morton
2008-08-07  6:24 ` Jeff Garzik

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