* [PATCH] batman-adv:Make the function batadv_is_my_mac bool
@ 2015-06-11 2:25 Nicholas Krause
2015-06-11 5:53 ` Antonio Quartulli
0 siblings, 1 reply; 3+ messages in thread
From: Nicholas Krause @ 2015-06-11 2:25 UTC (permalink / raw)
To: mareklindner-rVWd3aGhH2z5bpWLKbzFeg
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
antonio-x4xJYDvStAgysxA8WJXlww, davem-fT/PcQaiUtIeIZ0/mPfg9Q
This makes the function batadv_is_my_mac bool now due
to this particular function only returning either one
or zero as its return value.
Signed-off-by: Nicholas Krause <xerofoify-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
net/batman-adv/main.c | 6 +++---
net/batman-adv/main.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
index 12fc77b..47051d1 100644
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -210,7 +210,7 @@ void batadv_mesh_free(struct net_device *soft_iface)
* @bat_priv: the bat priv with all the soft interface information
* @addr: the address to check
*/
-int batadv_is_my_mac(struct batadv_priv *bat_priv, const uint8_t *addr)
+bool batadv_is_my_mac(struct batadv_priv *bat_priv, const uint8_t *addr)
{
const struct batadv_hard_iface *hard_iface;
@@ -224,11 +224,11 @@ int batadv_is_my_mac(struct batadv_priv *bat_priv, const uint8_t *addr)
if (batadv_compare_eth(hard_iface->net_dev->dev_addr, addr)) {
rcu_read_unlock();
- return 1;
+ return true;
}
}
rcu_read_unlock();
- return 0;
+ return false;
}
/**
diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h
index 4d23188..8f6e256 100644
--- a/net/batman-adv/main.h
+++ b/net/batman-adv/main.h
@@ -195,7 +195,7 @@ extern struct workqueue_struct *batadv_event_workqueue;
int batadv_mesh_init(struct net_device *soft_iface);
void batadv_mesh_free(struct net_device *soft_iface);
-int batadv_is_my_mac(struct batadv_priv *bat_priv, const uint8_t *addr);
+bool batadv_is_my_mac(struct batadv_priv *bat_priv, const uint8_t *addr);
struct batadv_hard_iface *
batadv_seq_print_text_primary_if_get(struct seq_file *seq);
int batadv_max_header_len(void);
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] batman-adv:Make the function batadv_is_my_mac bool
2015-06-11 2:25 [PATCH] batman-adv:Make the function batadv_is_my_mac bool Nicholas Krause
@ 2015-06-11 5:53 ` Antonio Quartulli
[not found] ` <55792240.7040301-x4xJYDvStAgysxA8WJXlww@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Antonio Quartulli @ 2015-06-11 5:53 UTC (permalink / raw)
To: Nicholas Krause
Cc: mareklindner, sw, davem, b.a.t.m.a.n, netdev, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 493 bytes --]
Nicholas,
On 11/06/15 04:25, Nicholas Krause wrote:
> This makes the function batadv_is_my_mac bool now due
> to this particular function only returning either one
> or zero as its return value.
>
> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
NAK.
we already have ("batman-adv: main, Convert is_my_mac() to bool") in
net-next that does exactly the same. I guess you did not pull the latest
changes before writing this patch?
Cheers,
--
Antonio Quartulli
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] batman-adv:Make the function batadv_is_my_mac bool
[not found] ` <55792240.7040301-x4xJYDvStAgysxA8WJXlww@public.gmane.org>
@ 2015-06-11 13:17 ` Nicholas Krause
0 siblings, 0 replies; 3+ messages in thread
From: Nicholas Krause @ 2015-06-11 13:17 UTC (permalink / raw)
To: Antonio Quartulli
Cc: mareklindner-rVWd3aGhH2z5bpWLKbzFeg,
netdev-u79uwXL29TY76Z2rM5mHXA,
b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, davem-fT/PcQaiUtIeIZ0/mPfg9Q
On June 11, 2015 1:53:04 AM EDT, Antonio Quartulli <antonio-x4xJYDvStAiDeErcrpiq8g@public.gmane.orgm> wrote:
>Nicholas,
>
>On 11/06/15 04:25, Nicholas Krause wrote:
>> This makes the function batadv_is_my_mac bool now due
>> to this particular function only returning either one
>> or zero as its return value.
>>
>> Signed-off-by: Nicholas Krause <xerofoify-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>
>NAK.
>
>we already have ("batman-adv: main, Convert is_my_mac() to bool") in
>net-next that does exactly the same. I guess you did not pull the
>latest
>changes before writing this patch?
>
>Cheers,
I was basing this patch off Linux's tree,
that's why.
Nick
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-06-11 13:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-11 2:25 [PATCH] batman-adv:Make the function batadv_is_my_mac bool Nicholas Krause
2015-06-11 5:53 ` Antonio Quartulli
[not found] ` <55792240.7040301-x4xJYDvStAgysxA8WJXlww@public.gmane.org>
2015-06-11 13:17 ` Nicholas Krause
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).