Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c0cadc6 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

udp: fix two sparse errors



commit ba418fa3 ("soreuseport: UDP/IPv4 implementation")
added following sparse errors :

net/ipv4/udp.c:433:60: warning: cast from restricted __be16
net/ipv4/udp.c:433:60: warning: incorrect type in argument 1 (different base types)
net/ipv4/udp.c:433:60:    expected unsigned short [unsigned] [usertype] val
net/ipv4/udp.c:433:60:    got restricted __be16 [usertype] sport
net/ipv4/udp.c:433:60: warning: cast from restricted __be16
net/ipv4/udp.c:433:60: warning: cast from restricted __be16
net/ipv4/udp.c:514:60: warning: cast from restricted __be16
net/ipv4/udp.c:514:60: warning: incorrect type in argument 1 (different base types)
net/ipv4/udp.c:514:60:    expected unsigned short [unsigned] [usertype] val
net/ipv4/udp.c:514:60:    got restricted __be16 [usertype] sport
net/ipv4/udp.c:514:60: warning: cast from restricted __be16
net/ipv4/udp.c:514:60: warning: cast from restricted __be16

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5b9b6263
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -430,7 +430,7 @@ begin:
			reuseport = sk->sk_reuseport;
			reuseport = sk->sk_reuseport;
			if (reuseport) {
			if (reuseport) {
				hash = inet_ehashfn(net, daddr, hnum,
				hash = inet_ehashfn(net, daddr, hnum,
						    saddr, htons(sport));
						    saddr, sport);
				matches = 1;
				matches = 1;
			}
			}
		} else if (score == badness && reuseport) {
		} else if (score == badness && reuseport) {
@@ -511,7 +511,7 @@ begin:
			reuseport = sk->sk_reuseport;
			reuseport = sk->sk_reuseport;
			if (reuseport) {
			if (reuseport) {
				hash = inet_ehashfn(net, daddr, hnum,
				hash = inet_ehashfn(net, daddr, hnum,
						    saddr, htons(sport));
						    saddr, sport);
				matches = 1;
				matches = 1;
			}
			}
		} else if (score == badness && reuseport) {
		} else if (score == badness && reuseport) {