mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] phy: Add missing forward declaration (fixes compiler warning)
@ 2010-08-03 17:04 Stefan Weil
  2010-08-15  7:01 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2010-08-03 17:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Stefan Weil, David S. Miller, Anton Vorontsov, Ben Hutchings,
	Jason Gunthorpe

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@davemloft.net>
Cc: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 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 {
 	PHY_INTERFACE_MODE_MII,
-- 
1.5.6.5


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

end of thread, other threads:[~2010-08-15  7:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-03 17:04 [PATCH] phy: Add missing forward declaration (fixes compiler warning) Stefan Weil
2010-08-15  7:01 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®