iw_cxgb4: Convert a __force cast
Subsystems (2)
PATCH 1/1 iw_cxgb4: Convert a __force cast
__force casts should be avoided if there is a better alternative. Hence modify the comparison of s_addr with INADDR_ANY such that the __force cast is no longer necessary.
Signed-off-by Bart Van Assche <[email protected]>
Cc Steve Wise <[email protected]>
Cc Vipul Pandya <[email protected]>
--- drivers/infiniband/hw/cxgb4/cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/cxgb4/cm.c +1 -1
@@ -3108,7 +3108,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)/* * Handle loopback requests to INADDR_ANY. */ -if ((__force int )raddr->sin_addr.s_addr ==INADDR_ANY ) { +if (raddr->sin_addr.s_addr ==htonl (INADDR_ANY )) { err =pick_local_ipaddrs (dev, cm_id);if (err) goto fail1;
Signature · 6 lines
2.8.1 -- 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): [email protected]
Steve Wise
Acked-byQuoted 4 lines · Bart Van Assche
__forcecasts should be avoided if there is a better alternative. Hence modify the comparison ofs_addrwithINADDR_ANYsuch that the__forcecast is no longer necessary.
Looks good.
Acked-by Steve Wise <[email protected]>
--
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