mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
net: use net_eq to compare nets
Generated with the following semantic patch
@@
struct net *n1;
struct net *n2;
@@
- n1 == n2
+ net_eq(n1, n2)
@@
struct net *n1;
struct net *n2;
@@
- n1 != n2
+ !net_eq(n1, n2)
applied over {include,net,drivers/net}.
Signed-off-by: Octavian Purdila <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
4ba3eb034f
commit
09ad9bc752
46 changed files with 74 additions and 72 deletions
|
|
@ -365,7 +365,7 @@ static int packet_rcv_spkt(struct sk_buff *skb, struct net_device *dev,
|
|||
if (skb->pkt_type == PACKET_LOOPBACK)
|
||||
goto out;
|
||||
|
||||
if (dev_net(dev) != sock_net(sk))
|
||||
if (!net_eq(dev_net(dev), sock_net(sk)))
|
||||
goto out;
|
||||
|
||||
skb = skb_share_check(skb, GFP_ATOMIC);
|
||||
|
|
@ -553,7 +553,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,
|
|||
sk = pt->af_packet_priv;
|
||||
po = pkt_sk(sk);
|
||||
|
||||
if (dev_net(dev) != sock_net(sk))
|
||||
if (!net_eq(dev_net(dev), sock_net(sk)))
|
||||
goto drop;
|
||||
|
||||
skb->dev = dev;
|
||||
|
|
@ -674,7 +674,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev,
|
|||
sk = pt->af_packet_priv;
|
||||
po = pkt_sk(sk);
|
||||
|
||||
if (dev_net(dev) != sock_net(sk))
|
||||
if (!net_eq(dev_net(dev), sock_net(sk)))
|
||||
goto drop;
|
||||
|
||||
if (dev->header_ops) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue