* [PATCH] net/9p: Fix sparse endian warning in trans_fd.c
@ 2020-06-18 18:34 Alexander Kapshuk
2020-06-18 19:09 ` Dominique Martinet
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Kapshuk @ 2020-06-18 18:34 UTC (permalink / raw)
To: ericvh, lucho, asmadeus
Cc: davem, kuba, v9fs-developer, netdev, linux-kernel, alexander.kapshuk
Address sparse endian warning:
net/9p/trans_fd.c:932:28: warning: incorrect type in assignment (different base types)
net/9p/trans_fd.c:932:28: expected restricted __be32 [addressable] [assigned] [usertype] s_addr
net/9p/trans_fd.c:932:28: got unsigned long
Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com>
---
net/9p/trans_fd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
index 13cd683a658a..2581f5145a22 100644
--- a/net/9p/trans_fd.c
+++ b/net/9p/trans_fd.c
@@ -929,7 +929,7 @@ static int p9_bind_privport(struct socket *sock)
memset(&cl, 0, sizeof(cl));
cl.sin_family = AF_INET;
- cl.sin_addr.s_addr = INADDR_ANY;
+ cl.sin_addr.s_addr = htonl(INADDR_ANY);
for (port = p9_ipport_resv_max; port >= p9_ipport_resv_min; port--) {
cl.sin_port = htons((ushort)port);
err = kernel_bind(sock, (struct sockaddr *)&cl, sizeof(cl));
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net/9p: Fix sparse endian warning in trans_fd.c
2020-06-18 18:34 [PATCH] net/9p: Fix sparse endian warning in trans_fd.c Alexander Kapshuk
@ 2020-06-18 19:09 ` Dominique Martinet
2020-06-18 19:27 ` Alexander Kapshuk
0 siblings, 1 reply; 3+ messages in thread
From: Dominique Martinet @ 2020-06-18 19:09 UTC (permalink / raw)
To: Alexander Kapshuk
Cc: ericvh, lucho, davem, kuba, v9fs-developer, netdev, linux-kernel
Alexander Kapshuk wrote on Thu, Jun 18, 2020:
> Address sparse endian warning:
> net/9p/trans_fd.c:932:28: warning: incorrect type in assignment (different base types)
> net/9p/trans_fd.c:932:28: expected restricted __be32 [addressable] [assigned] [usertype] s_addr
> net/9p/trans_fd.c:932:28: got unsigned long
>
> Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com>
INADDR_ANY is 0 so this really is noop but sure, less warnings is always
good. I'll take this one for 5.9.
Thanks!
--
Dominique
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net/9p: Fix sparse endian warning in trans_fd.c
2020-06-18 19:09 ` Dominique Martinet
@ 2020-06-18 19:27 ` Alexander Kapshuk
0 siblings, 0 replies; 3+ messages in thread
From: Alexander Kapshuk @ 2020-06-18 19:27 UTC (permalink / raw)
To: Dominique Martinet
Cc: ericvh, lucho, davem, kuba, v9fs-developer, netdev, linux-kernel
On Thu, Jun 18, 2020 at 10:09 PM Dominique Martinet
<asmadeus@codewreck.org> wrote:
>
> Alexander Kapshuk wrote on Thu, Jun 18, 2020:
> > Address sparse endian warning:
> > net/9p/trans_fd.c:932:28: warning: incorrect type in assignment (different base types)
> > net/9p/trans_fd.c:932:28: expected restricted __be32 [addressable] [assigned] [usertype] s_addr
> > net/9p/trans_fd.c:932:28: got unsigned long
> >
> > Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com>
>
> INADDR_ANY is 0 so this really is noop but sure, less warnings is always
> good. I'll take this one for 5.9.
> Thanks!
> --
> Dominique
Noted.
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-18 19:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-18 18:34 [PATCH] net/9p: Fix sparse endian warning in trans_fd.c Alexander Kapshuk
2020-06-18 19:09 ` Dominique Martinet
2020-06-18 19:27 ` Alexander Kapshuk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).