diff options
author | Florian Westphal <fw@strlen.de> | 2019-05-31 19:27:08 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-03 04:06:26 +0300 |
commit | cb8f1478cea68bc9c9bca8bded9617d9b0b7beb6 (patch) | |
tree | 3c21f50e4bf992a2b691aabed609488143b5113a /drivers/net/wan | |
parent | cd5a411dbaeb9fd70e2a8241a74b6f52a1a572ca (diff) | |
download | linux-cb8f1478cea68bc9c9bca8bded9617d9b0b7beb6.tar.xz |
drivers: use in_dev_for_each_ifa_rtnl/rcu
Like previous patches, use the new iterator macros to avoid sparse
warnings once proper __rcu annotations are added.
Compile tested only.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r-- | drivers/net/wan/hdlc_cisco.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/wan/hdlc_cisco.c b/drivers/net/wan/hdlc_cisco.c index 320039d329c7..4976ca3f30c7 100644 --- a/drivers/net/wan/hdlc_cisco.c +++ b/drivers/net/wan/hdlc_cisco.c @@ -196,16 +196,15 @@ static int cisco_rx(struct sk_buff *skb) mask = ~cpu_to_be32(0); /* is the mask correct? */ if (in_dev != NULL) { - struct in_ifaddr **ifap = &in_dev->ifa_list; + const struct in_ifaddr *ifa; - while (*ifap != NULL) { + in_dev_for_each_ifa_rcu(ifa, in_dev) { if (strcmp(dev->name, - (*ifap)->ifa_label) == 0) { - addr = (*ifap)->ifa_local; - mask = (*ifap)->ifa_mask; + ifa->ifa_label) == 0) { + addr = ifa->ifa_local; + mask = ifa->ifa_mask; break; } - ifap = &(*ifap)->ifa_next; } cisco_keepalive_send(dev, CISCO_ADDR_REPLY, |