* [Bridge] [PATCH 9/9] Avoid 'statement with no effect' compiler warnings [not found] <1351980150-24145-1-git-send-email-lee.jones@linaro.org> @ 2012-11-03 22:02 ` Lee Jones 2012-11-04 6:00 ` David Miller 0 siblings, 1 reply; 3+ messages in thread From: Lee Jones @ 2012-11-03 22:02 UTC (permalink / raw) To: linux-kernel; +Cc: netdev, Stephen Hemminger, bridge, Lee Jones 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> --- net/bridge/br_private.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index 9b278c4..af5f584 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h @@ -566,10 +566,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 -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Bridge] [PATCH 9/9] Avoid 'statement with no effect' compiler warnings 2012-11-03 22:02 ` [Bridge] [PATCH 9/9] Avoid 'statement with no effect' compiler warnings Lee Jones @ 2012-11-04 6:00 ` David Miller 2012-11-04 7:55 ` Lee Jones 0 siblings, 1 reply; 3+ messages in thread From: David Miller @ 2012-11-04 6:00 UTC (permalink / raw) To: lee.jones; +Cc: netdev, shemminger, bridge, linux-kernel From: Lee Jones <lee.jones@linaro.org> Date: Sat, 3 Nov 2012 23:02:30 +0100 > 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> Applied, but please use more informative subject lines. You should prefix your subject line after [PATCH ...] with the name of the subsystem you are touching, a ": " then the headline description. So here you would have used "bridge: " and that's what I added when I commited this patch. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Bridge] [PATCH 9/9] Avoid 'statement with no effect' compiler warnings 2012-11-04 6:00 ` David Miller @ 2012-11-04 7:55 ` Lee Jones 0 siblings, 0 replies; 3+ messages in thread From: Lee Jones @ 2012-11-04 7:55 UTC (permalink / raw) To: David Miller; +Cc: netdev, shemminger, bridge, linux-kernel On Sun, 04 Nov 2012, David Miller wrote: > From: Lee Jones <lee.jones@linaro.org> > Date: Sat, 3 Nov 2012 23:02:30 +0100 > > > 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> > > Applied, but please use more informative subject lines. > > You should prefix your subject line after [PATCH ...] with > the name of the subsystem you are touching, a ": " then > the headline description. > > So here you would have used "bridge: " and that's what I added when I > commited this patch. Yes, of course I should have done, and usually do. This was an oversight, sorry about that. -- Lee Jones Linaro ST-Ericsson Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-04 7:55 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <1351980150-24145-1-git-send-email-lee.jones@linaro.org> 2012-11-03 22:02 ` [Bridge] [PATCH 9/9] Avoid 'statement with no effect' compiler warnings Lee Jones 2012-11-04 6:00 ` David Miller 2012-11-04 7:55 ` Lee Jones
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).