netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bridge: return boolean instead of integer in br_multicast_is_router
@ 2018-01-18 23:37 Gustavo A. R. Silva
  2018-01-19  0:22 ` Stephen Hemminger
  2018-01-22 21:13 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Gustavo A. R. Silva @ 2018-01-18 23:37 UTC (permalink / raw)
  To: Stephen Hemminger, David S. Miller
  Cc: bridge, netdev, linux-kernel, Gustavo A. R. Silva

Return statements in functions returning bool should use
true/false instead of 1/0.

This issue was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 net/bridge/br_private.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index 80559fd..8e13a64 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -760,7 +760,7 @@ static inline void br_multicast_flood(struct net_bridge_mdb_entry *mdst,
 
 static inline bool br_multicast_is_router(struct net_bridge *br)
 {
-	return 0;
+	return false;
 }
 
 static inline bool br_multicast_querier_exists(struct net_bridge *br,
-- 
2.7.4

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

* Re: [PATCH] bridge: return boolean instead of integer in br_multicast_is_router
  2018-01-18 23:37 [PATCH] bridge: return boolean instead of integer in br_multicast_is_router Gustavo A. R. Silva
@ 2018-01-19  0:22 ` Stephen Hemminger
  2018-01-19  0:55   ` Gustavo A. R. Silva
  2018-01-22 21:13 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2018-01-19  0:22 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: David S. Miller, bridge, netdev, linux-kernel

On Thu, 18 Jan 2018 17:37:45 -0600
"Gustavo A. R. Silva" <garsilva@embeddedor.com> wrote:

> Return statements in functions returning bool should use
> true/false instead of 1/0.
> 
> This issue was detected with the help of Coccinelle.
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>

LGTM

Fixes: 85b352693264 ("bridge: Fix build error when IGMP_SNOOPING is not enabled")
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>

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

* Re: [PATCH] bridge: return boolean instead of integer in br_multicast_is_router
  2018-01-19  0:22 ` Stephen Hemminger
@ 2018-01-19  0:55   ` Gustavo A. R. Silva
  0 siblings, 0 replies; 4+ messages in thread
From: Gustavo A. R. Silva @ 2018-01-19  0:55 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David S. Miller, bridge, netdev, linux-kernel


Quoting Stephen Hemminger <stephen@networkplumber.org>:

> On Thu, 18 Jan 2018 17:37:45 -0600
> "Gustavo A. R. Silva" <garsilva@embeddedor.com> wrote:
>
>> Return statements in functions returning bool should use
>> true/false instead of 1/0.
>>
>> This issue was detected with the help of Coccinelle.
>>
>> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
>
> LGTM
>
> Fixes: 85b352693264 ("bridge: Fix build error when IGMP_SNOOPING is  
> not enabled")
> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>

Thanks Stephen.
--
Gustavo

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

* Re: [PATCH] bridge: return boolean instead of integer in br_multicast_is_router
  2018-01-18 23:37 [PATCH] bridge: return boolean instead of integer in br_multicast_is_router Gustavo A. R. Silva
  2018-01-19  0:22 ` Stephen Hemminger
@ 2018-01-22 21:13 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2018-01-22 21:13 UTC (permalink / raw)
  To: garsilva; +Cc: stephen, bridge, netdev, linux-kernel

From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
Date: Thu, 18 Jan 2018 17:37:45 -0600

> Return statements in functions returning bool should use
> true/false instead of 1/0.
> 
> This issue was detected with the help of Coccinelle.
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>

Applied to net-next.

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

end of thread, other threads:[~2018-01-22 21:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-18 23:37 [PATCH] bridge: return boolean instead of integer in br_multicast_is_router Gustavo A. R. Silva
2018-01-19  0:22 ` Stephen Hemminger
2018-01-19  0:55   ` Gustavo A. R. Silva
2018-01-22 21:13 ` David Miller

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).