From: Lee Jones Date: Sat, 3 Nov 2012 22:02:30 +0000 (+0100) Subject: bridge: Avoid 'statement with no effect' compiler warnings X-Git-Tag: upstream/snapshot3+hdmi~6096^2~445 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0cb2bbbea0857c5c76db4cae85343553a882c0de;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Cc: bridge@lists.linux-foundation.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: David S. Miller --- diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index d5efa57..22111ff 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