enic: fix pci_alloc_consistent argument
Subsystems (2)
PATCH 1/1 enic: fix pci_alloc_consistent argument
From: Randy Dunlap <[email protected]>
Fix build warning on i386 (32-bit) with 32-bit dma_addr_t:
drivers/net/enic/vnic_dev.c: In function 'vnic_dev_init_prov':drivers/net/enic/vnic_dev.c:716: warning: passing argument 3 of 'pci_alloc_consistent' from incompatible pointer type include/asm-generic/pci-dma-compat.h:16: note: expected 'dma_addr_t *' but argument is of type 'u64 *'
Now builds without warnings on i386 and on x86_64.
--- drivers/net/enic/vnic_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/enic/vnic_dev.c +1 -1
@@ -709,7 +709,7 @@ int vnic_dev_init_prov(struct vnic_dev * {u64 a0, a1 = len;int wait =1000 ; -u64 prov_pa; +dma_addr_t prov_pa;void *prov_buf;int ret;
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
Quoted 12 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
Fix build warning on i386 (32-bit) with 32-bit
dma_addr_t:
drivers/net/enic/vnic_dev.c: In function 'vnic_dev_init_prov':drivers/net/enic/vnic_dev.c:716: warning: passing argument 3 of 'pci_alloc_consistent' from incompatible pointer typeinclude/asm-generic/pci-dma-compat.h:16: note: expected 'dma_addr_t*' but argument is of type 'u64 *'Now builds without warnings on i386 and on
x86_64.
Quoted 7 lines
Signed-off-by Randy Dunlap <[email protected]>Cc Scott Feldman <[email protected]>Cc Vasanthy Kolluri <[email protected]>Cc Roopa Prabhu <[email protected]>--- drivers/net/enic/vnic_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
David Miller
maintainerFrom: Scott Feldman <[email protected]>
Date: Tue, 08 Jun 2010 14:55:27 -0700
Quoted 22 lines · Randy Dunlap
Quoted 13 lines
From: Randy Dunlap <[email protected]>
Fix build warning on i386 (32-bit) with 32-bit
dma_addr_t:
drivers/net/enic/vnic_dev.c: In function 'vnic_dev_init_prov':drivers/net/enic/vnic_dev.c:716: warning: passing argument 3 of 'pci_alloc_consistent' from incompatible pointer typeinclude/asm-generic/pci-dma-compat.h:16: note: expected 'dma_addr_t*' but argument is of type 'u64 *'Now builds without warnings on i386 and on
x86_64.Quoted 7 lines
Signed-off-by Randy Dunlap <[email protected]>Cc Scott Feldman <[email protected]>Cc Vasanthy Kolluri <[email protected]>Cc Roopa Prabhu <[email protected]>--- drivers/net/enic/vnic_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 1 line
Acked-by Scott Feldman <[email protected]>
I'm applying this to net-2.6 since it's also a bug fix, as passing a u64 pointer in here will make pci_alloc_consistent() write garbage since it expects a dma_addr_t there which as on i386 could be 32-bit.