Skip to contentSkip to conversation

au1000_eth: Fix warnings.

NET Applied Ralf Baechle 3 participants 4 messages Jun 24, 2007 – Jun 27, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Fixed by including <linux/dma-mapping.h>:

CC drivers/net/au1000_eth.o
drivers/net/au1000_eth.c: In function 'au1000_probe':
drivers/net/au1000_eth.c:661: warning: implicit declaration of function 'dma_alloc_noncoherent' drivers/net/au1000_eth.c:802: warning: implicit declaration of function 'dma_free_noncoherent'

drivers/net/au1000_eth.c +1 -1
index c39ab80..c27cfce 100644
@@ -34,7 +34,7 @@
  *
  *
  */
-
+#include <linux/dma-mapping.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
#1 lore raw
Quoted 14 lines · On Sun, 24 Jun 2007 15:59:54 +0200 Ralf Baechle <[email protected]> wrote:

Fixed by including <linux/dma-mapping.h>:

CC drivers/net/au1000_eth.o
drivers/net/au1000_eth.c: In function 'au1000_probe':
drivers/net/au1000_eth.c:661: warning: implicit declaration of function 'dma_alloc_noncoherent' drivers/net/au1000_eth.c:802: warning: implicit declaration of function 'dma_free_noncoherent'

drivers/net/au1000_eth.c +0 -0
index c39ab80..c27cfce 100644

drivers/net/au1000_eth.c line 40

Quoted 8 lines
drivers/net/au1000_eth.c +1 -1
@@ -34,7 +34,7 @@
  *
  *
  */
-
+#include <linux/dma-mapping.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/string.h>

That's more than a warning fix. On most platforms, dma_alloc_noncoherent() is a #define so the driver just won't link there.

<looks>

But the driver is mips-only, and MIPS uses a regular C function for dma_alloc_noncoherent(), so you got lucky.

Still, I'd say this is for-2.6.22.

#2 lore raw
Quoted 7 lines · Andrew Morton

That's more than a warning fix. On most platforms, dma_alloc_noncoherent() is a #define so the driver just won't link there.

<looks>

But the driver is mips-only, and MIPS uses a regular C function for dma_alloc_noncoherent(), so you got lucky.

Yep, the way this driver is being used (32-bit only) it happens to just work.

Quoted 1 line

Still, I'd say this is for-2.6.22.

Yep.

Ralf

Applied
#3 lore raw
In reply to Ralf Baechle
Quoted 8 lines · Ralf Baechle

Fixed by including <linux/dma-mapping.h>:

CC drivers/net/au1000_eth.o
drivers/net/au1000_eth.c: In function 'au1000_probe':
drivers/net/au1000_eth.c:661: warning: implicit declaration of function 'dma_alloc_noncoherent' drivers/net/au1000_eth.c:802: warning: implicit declaration of function 'dma_free_noncoherent'

applied to #upstream-fixes