Răsfoiți Sursa

arcnet: Convert arcnet_dump_skb macro to static inline

Make sure the arguments are tested appropriately when not using
this function.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Joe Perches 10 ani în urmă
părinte
comite
83df99b50f
1 a modificat fișierele cu 4 adăugiri și 1 ștergeri
  1. 4 1
      include/linux/arcdevice.h

+ 4 - 1
include/linux/arcdevice.h

@@ -326,7 +326,10 @@ struct arcnet_local {
 #if ARCNET_DEBUG_MAX & D_SKB
 #if ARCNET_DEBUG_MAX & D_SKB
 void arcnet_dump_skb(struct net_device *dev, struct sk_buff *skb, char *desc);
 void arcnet_dump_skb(struct net_device *dev, struct sk_buff *skb, char *desc);
 #else
 #else
-#define arcnet_dump_skb(dev, skb, desc) ;
+static inline
+void arcnet_dump_skb(struct net_device *dev, struct sk_buff *skb, char *desc)
+{
+}
 #endif
 #endif
 
 
 void arcnet_unregister_proto(struct ArcProto *proto);
 void arcnet_unregister_proto(struct ArcProto *proto);