infiniband: hw: cxgb4: Use AF_INET for sin_family field
Subsystems (2)
PATCH 1/1 infiniband: hw: cxgb4: Use AF_INET for sin_family field
Elsewhere the sin_family field holds a value with a name of the form AF_..., so it seems reasonable to do so here as well. Also the values of PF_INET and AF_INET are the same.
The semantic patch that makes this change is as follows:
//</smpl>
@@
struct sockaddr_in sip;
@@
(
sip.sin_family ==
- PF_INET
+ AF_INET
|
sip.sin_family !=
- PF_INET
+ AF_INET
|
sip.sin_family =
- PF_INET
+ AF_INET
)
//</smpl>
--- drivers/infiniband/hw/cxgb4/cm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/infiniband/hw/cxgb4/cm.c +3 -3
@@ -2516,18 +2516,18 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb)struct sockaddr_in *sin = (struct sockaddr_in *) &child_ep->com.local_addr; - sin->sin_family =PF_INET ; + sin->sin_family =AF_INET ; sin->sin_port = local_port; sin->sin_addr.s_addr = *(__be32 *)local_ip; sin = (struct sockaddr_in *)&child_ep->com.local_addr; - sin->sin_family =PF_INET ; + sin->sin_family =AF_INET ; sin->sin_port = ((struct sockaddr_in *) &parent_ep->com.local_addr)->sin_port; sin->sin_addr.s_addr = *(__be32 *)local_ip; sin = (struct sockaddr_in *)&child_ep->com.remote_addr; - sin->sin_family =PF_INET ; + sin->sin_family =AF_INET ; sin->sin_port = peer_port; sin->sin_addr.s_addr = *(__be32 *)peer_ip; }else {
Signature · 6 lines
2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1482543875-17141-1-git-send-email-mayhs11saini-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Leon Romanovsky
Reviewed-byQuoted 26 lines · Shyam Saini
Elsewhere the
sin_familyfield holds a value with a name of the formAF_..., so it seems reasonable to do so here as well. Also the values ofPF_INETandAF_INETare the same.The semantic patch that makes this change is as follows:
//</smpl>
@@
structsockaddr_insip;
@@(
sip.sin_family ==
-PF_INET
+AF_INET
|
sip.sin_family !=
-PF_INET
+AF_INET
|
sip.sin_family =
-PF_INET
+AF_INET
)
//</smpl>
Quoted 4 lines
Signed-off-by Shyam Saini <[email protected]>--- drivers/infiniband/hw/cxgb4/cm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Thanks,
Quoted 34 lines
drivers/infiniband/hw/cxgb4/cm.c +3
-4@@ -2516,18 +2516,18 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb)struct sockaddr_in *sin = (struct sockaddr_in *) &child_ep->com.local_addr; - sin->sin_family =PF_INET ; + sin->sin_family =AF_INET ; sin->sin_port = local_port; sin->sin_addr.s_addr = *(__be32 *)local_ip; sin = (struct sockaddr_in *)&child_ep->com.local_addr; - sin->sin_family =PF_INET ; + sin->sin_family =AF_INET ; sin->sin_port = ((struct sockaddr_in *) &parent_ep->com.local_addr)->sin_port; sin->sin_addr.s_addr = *(__be32 *)local_ip; sin = (struct sockaddr_in *)&child_ep->com.remote_addr; - sin->sin_family =PF_INET ; + sin->sin_family =AF_INET ; sin->sin_port = peer_port; sin->sin_addr.s_addr = *(__be32 *)peer_ip; }else { --2.7.4
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Doug Ledford
AppliedQuoted 27 lines · Shyam Saini
Elsewhere the
sin_familyfield holds a value with a name of the formAF_..., so it seems reasonable to do so here as well. Also the values
ofPF_INETandAF_INETare the same.The semantic patch that makes this change is as follows:
//</smpl>
@@
structsockaddr_insip;
@@(
sip.sin_family ==
-PF_INET
+AF_INET
|
sip.sin_family !=
-PF_INET
+AF_INET
|
sip.sin_family =
-PF_INET
+AF_INET
)
//</smpl>
Quoted 1 line
Signed-off-by Shyam Saini <[email protected]>
Thanks, applied.
Signature · 4 lines
Doug Ledford <[email protected]> GPG KeyID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD