From: Bart Van Assche Date: Tue, 12 Apr 2016 21:43:41 +0000 (-0700) Subject: iwcm: Fix a sparse warning X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=825107a237bd0a1589e5af3853a14ba61bef02ef;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git iwcm: Fix a sparse warning Avoid that sparse complains about the comparison of s_addr with INADDR_ANY. Signed-off-by: Bart Van Assche Cc: Steve Wise Cc: Faisal Latif Reviewed-by: Steve Wise Signed-off-by: Doug Ledford --- diff --git a/drivers/infiniband/core/iwcm.c b/drivers/infiniband/core/iwcm.c index e28a160cdab0..fe0bd6c9df3d 100644 --- a/drivers/infiniband/core/iwcm.c +++ b/drivers/infiniband/core/iwcm.c @@ -459,7 +459,7 @@ static void iw_cm_check_wildcard(struct sockaddr_storage *pm_addr, if (pm_addr->ss_family == AF_INET) { struct sockaddr_in *pm4_addr = (struct sockaddr_in *)pm_addr; - if (pm4_addr->sin_addr.s_addr == INADDR_ANY) { + if (pm4_addr->sin_addr.s_addr == htonl(INADDR_ANY)) { struct sockaddr_in *cm4_addr = (struct sockaddr_in *)cm_addr; struct sockaddr_in *cm4_outaddr =