netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] enic: fix pci_alloc_consistent argument
@ 2010-06-08 17:00 Randy Dunlap
  2010-06-08 21:55 ` Scott Feldman
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2010-06-08 17:00 UTC (permalink / raw)
  To: netdev; +Cc: davem, Scott Feldman, Vasanthy Kolluri, Roopa Prabhu

From: Randy Dunlap <randy.dunlap@oracle.com>

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.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc:	Scott Feldman <scofeldm@cisco.com>
Cc:	Vasanthy Kolluri <vkolluri@cisco.com>
Cc:	Roopa Prabhu <roprabhu@cisco.com>
---
 drivers/net/enic/vnic_dev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next-20100608.orig/drivers/net/enic/vnic_dev.c
+++ linux-next-20100608/drivers/net/enic/vnic_dev.c
@@ -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 ***

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

* Re: [PATCH -next] enic: fix pci_alloc_consistent argument
  2010-06-08 17:00 [PATCH -next] enic: fix pci_alloc_consistent argument Randy Dunlap
@ 2010-06-08 21:55 ` Scott Feldman
  2010-06-12 22:24   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Scott Feldman @ 2010-06-08 21:55 UTC (permalink / raw)
  To: Randy Dunlap, netdev; +Cc: davem, Vasanthy Kolluri, Roopa Prabhu

On 6/8/10 10:00 AM, "Randy Dunlap" <randy.dunlap@oracle.com> wrote:

> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> 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.
> 
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> Cc: Scott Feldman <scofeldm@cisco.com>
> Cc: Vasanthy Kolluri <vkolluri@cisco.com>
> Cc: Roopa Prabhu <roprabhu@cisco.com>
> ---
>  drivers/net/enic/vnic_dev.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Scott Feldman <scofeldm@cisco.com>


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

* Re: [PATCH -next] enic: fix pci_alloc_consistent argument
  2010-06-08 21:55 ` Scott Feldman
@ 2010-06-12 22:24   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2010-06-12 22:24 UTC (permalink / raw)
  To: scofeldm; +Cc: randy.dunlap, netdev, vkolluri, roprabhu

From: Scott Feldman <scofeldm@cisco.com>
Date: Tue, 08 Jun 2010 14:55:27 -0700

> On 6/8/10 10:00 AM, "Randy Dunlap" <randy.dunlap@oracle.com> wrote:
> 
>> From: Randy Dunlap <randy.dunlap@oracle.com>
>> 
>> 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.
>> 
>> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
>> Cc: Scott Feldman <scofeldm@cisco.com>
>> Cc: Vasanthy Kolluri <vkolluri@cisco.com>
>> Cc: Roopa Prabhu <roprabhu@cisco.com>
>> ---
>>  drivers/net/enic/vnic_dev.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Acked-by: Scott Feldman <scofeldm@cisco.com>

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.

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

end of thread, other threads:[~2010-06-12 22:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-08 17:00 [PATCH -next] enic: fix pci_alloc_consistent argument Randy Dunlap
2010-06-08 21:55 ` Scott Feldman
2010-06-12 22:24   ` David 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).