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>
This commit is contained in:

committed by
David S. Miller

parent
cd5a411dba
commit
cb8f1478ce
@@ -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,
|
||||
|
Reference in New Issue
Block a user