From: Stefan Weil on
Without forward declaration for struct sk_buff, compilation
of drivers/net/phy/fixed.c results in a warning:

CC drivers/net/phy/fixed.o
In file included from drivers/net/phy/fixed.c:20:
include/linux/phy.h:342: warning: 'struct sk_buff' declared inside parameter list
include/linux/phy.h:342: warning: its scope is only this definition or declaration, which is probably not what you want
include/linux/phy.h:343: warning: 'struct sk_buff' declared inside parameter list

(tested with linux kernel for openwrt / ar7, gcc-4.1.2)

Cc: David S. Miller <davem(a)>
Cc: Anton Vorontsov <avorontsov(a)>
Cc: Ben Hutchings <ben(a)>
Cc: Jason Gunthorpe <jgunthorpe(a)>
Cc: linux-kernel(a)
Signed-off-by: Stefan Weil <weil(a)>
include/linux/phy.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/linux/phy.h b/include/linux/phy.h
index 987e111..65e8d72 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -51,6 +51,8 @@
#define PHY_HAS_INTERRUPT 0x00000001
#define PHY_HAS_MAGICANEG 0x00000002

+struct sk_buff;
/* Interface Mode definitions */
typedef enum {

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)
More majordomo info at
Please read the FAQ at