summaryrefslogtreecommitdiff
path: root/net/bridge
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2012-11-03 23:02:30 +0100
committerDavid S. Miller <davem@davemloft.net>2012-11-04 01:59:29 -0400
commit0cb2bbbea0857c5c76db4cae85343553a882c0de (patch)
tree8dde01088d642a45a621453a34fdc2165e369678 /net/bridge
parentf7c3f96a41f16865e6422bfb919312a716b16552 (diff)
bridge: Avoid 'statement with no effect' compiler warnings
Instead of issuing (0) statements when !CONFIG_SYSFS which will cause 'warning: ', we'll use inline statements instead. This will effectively do the same thing, but suppress any unnecessary warnings. Cc: Stephen Hemminger <shemminger@vyatta.com> Cc: bridge@lists.linux-foundation.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_private.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index d5efa57a2c20..22111ffd68df 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -570,10 +570,10 @@ extern void br_sysfs_delbr(struct net_device *dev);
#else
-#define br_sysfs_addif(p) (0)
-#define br_sysfs_renameif(p) (0)
-#define br_sysfs_addbr(dev) (0)
-#define br_sysfs_delbr(dev) do { } while(0)
+static inline int br_sysfs_addif(struct net_bridge_port *p) { return 0; }
+static inline int br_sysfs_renameif(struct net_bridge_port *p) { return 0; }
+static inline int br_sysfs_addbr(struct net_device *dev) { return 0; }
+static inline void br_sysfs_delbr(struct net_device *dev) { return; }
#endif /* CONFIG_SYSFS */
#endif