netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/1] driver: macvlan: Replace integer number with bool value
@ 2016-11-14  0:24 fgao
  2016-11-14 21:36 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: fgao @ 2016-11-14  0:24 UTC (permalink / raw)
  To: davem, kaber, netdev, gfree.wind

From: Gao Feng <gfree.wind@gmail.com>

The return value of function macvlan_addr_busy is used as bool value,
so use bool value instead of integer number "1" and "0".

Signed-off-by: Gao Feng <gfree.wind@gmail.com>
---
 drivers/net/macvlan.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index a064415..d0361f3 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -179,20 +179,20 @@ static void macvlan_hash_change_addr(struct macvlan_dev *vlan,
 	macvlan_hash_add(vlan);
 }
 
-static int macvlan_addr_busy(const struct macvlan_port *port,
-				const unsigned char *addr)
+static bool macvlan_addr_busy(const struct macvlan_port *port,
+			      const unsigned char *addr)
 {
 	/* Test to see if the specified multicast address is
 	 * currently in use by the underlying device or
 	 * another macvlan.
 	 */
 	if (ether_addr_equal_64bits(port->dev->dev_addr, addr))
-		return 1;
+		return true;
 
 	if (macvlan_hash_lookup(port, addr))
-		return 1;
+		return true;
 
-	return 0;
+	return false;
 }
 
 
-- 
1.9.1

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

* Re: [PATCH net-next 1/1] driver: macvlan: Replace integer number with bool value
  2016-11-14  0:24 [PATCH net-next 1/1] driver: macvlan: Replace integer number with bool value fgao
@ 2016-11-14 21:36 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-11-14 21:36 UTC (permalink / raw)
  To: fgao; +Cc: kaber, netdev, gfree.wind

From: fgao@ikuai8.com
Date: Mon, 14 Nov 2016 08:24:19 +0800

> From: Gao Feng <gfree.wind@gmail.com>
> 
> The return value of function macvlan_addr_busy is used as bool value,
> so use bool value instead of integer number "1" and "0".
> 
> Signed-off-by: Gao Feng <gfree.wind@gmail.com>

Applied, thanks.

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

end of thread, other threads:[~2016-11-14 21:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-14  0:24 [PATCH net-next 1/1] driver: macvlan: Replace integer number with bool value fgao
2016-11-14 21:36 ` 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).