linux-next: net tree build warning
Subsystems (3)
Hi Dave,
Today's linux-next build (x86_64 allmodconfig) produced this warning:
net/sctp/socket.c: In function 'sctp_setsockopt_autoclose':net/sctp/socket.c:2091: warning: large integer implicitly truncated to unsigned type
Introduced by commit f6778aab6ccc4b510b4dcfa770d9949b696b4545 ("sctp:
limit maximum autoclose setsockopt value") from the net tree.
Signature · 3 lines
Cheers, Stephen Rothwell [email protected] http://www.canb.auug.org.au/~sfr/
Quoted 9 lines · Stephen Rothwell
Hi Dave,
Today's linux-next build (
x86_64allmodconfig) produced this warning:
net/sctp/socket.c: In function 'sctp_setsockopt_autoclose':net/sctp/socket.c:2091: warning: large integer implicitly truncated to unsigned typeIntroduced by commit
f6778aab6ccc4b510b4dcfa770d9949b696b4545("sctp:
limit maximum autoclose setsockopt value") from the net tree.
Thanks, the fix is:
- sp->autoclose = MAX_SCHEDULE_TIMEOUT / HZ ;
+ sp->autoclose = (__u32)(MAX_SCHEDULE_TIMEOUT / HZ) ;
I'll reply to this mail with the patch in git format.
Andrei
PATCH 1/1 sctp: fix sctp_setsockopt_autoclose compile warning
Fix the following warning, when building on 64 bits:
net/sctp/socket.c:2091: warning: large integer implicitly
truncated to unsigned type
--- net/sctp/socket.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
net/sctp/socket.c +1 -1
@@ -2088,7 +2088,7 @@ static int sctp_setsockopt_autoclose(struct sock *sk, char __user *optval,return -EFAULT ;/* make sure it won't exceed MAX_SCHEDULE_TIMEOUT */ if (sp->autoclose > (MAX_SCHEDULE_TIMEOUT /HZ ) ) - sp->autoclose =MAX_SCHEDULE_TIMEOUT /HZ ; + sp->autoclose = (__u32)(MAX_SCHEDULE_TIMEOUT /HZ ) ;return 0 ; }
Signature · 1 line
1.6.5.3
David Miller
maintainerRe: [PATCH] sctp: fix sctp_setsockopt_autoclose compile warning
Please CC: all networking patches to [email protected]
Thank you.
Re: [PATCH] sctp: fix sctp_setsockopt_autoclose compile warning
In reply to Andrei Pelinescu-OnciulQuoted 6 lines · Andrei Pelinescu-Onciul
Fix the following warning, when building on 64 bits:
net/sctp/socket.c:2091: warning: large integer implicitly
truncated to unsigned typeSigned-off-by Andrei Pelinescu-Onciul <[email protected]>
Ack.
-vlad
Quoted 17 lines
--- net/sctp/socket.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)net/sctp/socket.c +1
-1@@ -2088,7 +2088,7 @@ static int sctp_setsockopt_autoclose(struct sock *sk, char __user *optval,return -EFAULT ;/* make sure it won't exceed MAX_SCHEDULE_TIMEOUT */ if (sp->autoclose > (MAX_SCHEDULE_TIMEOUT /HZ ) ) - sp->autoclose =MAX_SCHEDULE_TIMEOUT /HZ ; + sp->autoclose = (__u32)(MAX_SCHEDULE_TIMEOUT /HZ ) ;return 0 ; }
Re: [PATCH] sctp: fix sctp_setsockopt_autoclose compile warning
From: Vlad Yasevich <[email protected]>
Date: Tue, 01 Dec 2009 14:02:58 -0500
Quoted 11 lines
Quoted 6 lines · Andrei Pelinescu-Onciul
Fix the following warning, when building on 64 bits:
net/sctp/socket.c:2091: warning: large integer implicitly
truncated to unsigned typeSigned-off-by Andrei Pelinescu-Onciul <[email protected]>Ack.
Applied, but please submit networking patches always CC:'d to [email protected] otherwise they won't get logged in patchwork and therefore are most likely to get lost.