iw_cxgb4: Convert a __force cast
authorBart Van Assche <bart.vanassche@sandisk.com>
Tue, 12 Apr 2016 21:45:24 +0000 (14:45 -0700)
committerDoug Ledford <dledford@redhat.com>
Fri, 13 May 2016 23:38:11 +0000 (19:38 -0400)
__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 <bart.vanassche@sandisk.com>
Cc: Steve Wise <swise@opengridcomputing.com>
Cc: Vipul Pandya <vipul@chelsio.com>
Acked-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/cxgb4/cm.c

index c4b7f1f8f8a54161eaaeeec4075aa66bb680675c..a3a67216bce6748423ef0c4b33ed32740d54e29c 100644 (file)
@@ -3300,7 +3300,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;