drivers/net/netxen/netxen_nic_hw.c: fix printk warnings
Subsystems (2)
PATCH 2/2 drivers/net/netxen/netxen_nic_hw.c: fix printk warnings
From: Andrew Morton <[email protected]>
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.
---
drivers/net/netxen/netxen_nic_hw.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/netxen/netxen_nic_hw.c renamed from drivers/net/netxen/netxen_nic_hw.c~drivers-net-netxen-netxen_nic_hwc-fix-printk-warnings +4 -2
@@ -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 ; }
_
Quoted 9 lines · On Wed, Jul 30, 2008 at 12:50:12PM -0700, [email protected] wrote:
From: Andrew Morton <[email protected]>
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 :-(
Signature · 1 line
Horms
Quoted 8 lines · On Fri, 1 Aug 2008 16:19:53 +1000 Simon Horman <[email protected]> wrote:
Quoted 7 lines · On Wed, Jul 30, 2008 at 12:50:12PM -0700, [email protected] wrote:
From: Andrew Morton <[email protected]>
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'
Quoted 5 lines
Quoted 2 lines
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'.
David Miller
maintainerFrom: Andrew Morton <[email protected]>
Date: Thu, 31 Jul 2008 23:28:09 -0700
Quoted 1 line
I wonder who was the first 64-bit bright spark who decided to use `long'.
/me hides :)
Quoted 6 lines · On Thu, 31 Jul 2008 23:55:01 -0700 (PDT) David Miller <[email protected]>…
From: Andrew Morton <[email protected]>
Date: Thu, 31 Jul 2008 23:28:09 -0700Quoted 1 line
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.
Jeff Garzik
AppliedQuoted 40 lines · [email protected] wrote:
From: Andrew Morton <[email protected]>
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 <[email protected]>Signed-off-by Andrew Morton <[email protected]>---
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-warningsdrivers/net/netxen/netxen_nic_hw.cdrivers/net/netxen/netxen_nic_hw.c renamed from drivers/net/netxen/netxen_nic_hw.c~drivers-net-netxen-netxen_nic_hwc-fix-printk-warnings +4
-2@@ -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 ; }
Quoted 1 line
_
applied