From: Julian Wiedmann Date: Tue, 19 May 2020 19:10:10 +0000 (+0200) Subject: net/af_iucv: replace open-coded U16_MAX X-Git-Tag: v5.10.7~2469^2~153^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0d1c7664ed2044048d5ed790b943affa296bc3a4;p=platform%2Fkernel%2Flinux-rpi.git net/af_iucv: replace open-coded U16_MAX Improve the readability of a range check. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller --- diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index 84bd18f..b02470a 100644 --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -1559,7 +1560,7 @@ static int iucv_sock_setsockopt(struct socket *sock, int level, int optname, switch (sk->sk_state) { case IUCV_OPEN: case IUCV_BOUND: - if (val < 1 || val > (u16)(~0)) + if (val < 1 || val > U16_MAX) rc = -EINVAL; else iucv->msglimit = val;