Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

RDMA/cxgb3: 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 Coccinelle 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>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>

authored by

Amitoj Kaur Chawla and committed by
Doug Ledford
3b8fb4b8 56b2eca3

+2 -2
+2 -2
drivers/infiniband/hw/cxgb3/iwch_cm.c
··· 1396 1396 state_set(&child_ep->com, CONNECTING); 1397 1397 child_ep->com.tdev = tdev; 1398 1398 child_ep->com.cm_id = NULL; 1399 - child_ep->com.local_addr.sin_family = PF_INET; 1399 + child_ep->com.local_addr.sin_family = AF_INET; 1400 1400 child_ep->com.local_addr.sin_port = req->local_port; 1401 1401 child_ep->com.local_addr.sin_addr.s_addr = req->local_ip; 1402 - child_ep->com.remote_addr.sin_family = PF_INET; 1402 + child_ep->com.remote_addr.sin_family = AF_INET; 1403 1403 child_ep->com.remote_addr.sin_port = req->peer_port; 1404 1404 child_ep->com.remote_addr.sin_addr.s_addr = req->peer_ip; 1405 1405 get_ep(&parent_ep->com);