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.
--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/
On Nov 30, 2009 at 16:40, Stephen Rothwell <[email protected]> wrote:
> 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.
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
Fix the following warning, when building on 64 bits:
net/sctp/socket.c:2091: warning: large integer implicitly
truncated to unsigned type
Signed-off-by: Andrei Pelinescu-Onciul <[email protected]>
---
net/sctp/socket.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 71513b3..8961863 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -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;
}
--
1.6.5.3
Please CC: all networking patches to [email protected]
Thank you.
Andrei Pelinescu-Onciul wrote:
> Fix the following warning, when building on 64 bits:
>
> net/sctp/socket.c:2091: warning: large integer implicitly
> truncated to unsigned type
>
> Signed-off-by: Andrei Pelinescu-Onciul <[email protected]>
Ack.
-vlad
> ---
> net/sctp/socket.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/sctp/socket.c b/net/sctp/socket.c
> index 71513b3..8961863 100644
> --- a/net/sctp/socket.c
> +++ b/net/sctp/socket.c
> @@ -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;
> }
From: Vlad Yasevich <[email protected]>
Date: Tue, 01 Dec 2009 14:02:58 -0500
>
>
> Andrei Pelinescu-Onciul wrote:
>> Fix the following warning, when building on 64 bits:
>>
>> net/sctp/socket.c:2091: warning: large integer implicitly
>> truncated to unsigned type
>>
>> Signed-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.