linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: net tree build warning
@ 2009-11-30  5:40 Stephen Rothwell
  2009-11-30  9:49 ` Andrei Pelinescu-Onciul
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2009-11-30  5:40 UTC (permalink / raw)
  To: David S. Miller; +Cc: linux-next, linux-kernel, Andrei Pelinescu-Onciul

[-- Attachment #1: Type: text/plain, Size: 475 bytes --]

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                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: net tree build warning
  2009-11-30  5:40 linux-next: net tree build warning Stephen Rothwell
@ 2009-11-30  9:49 ` Andrei Pelinescu-Onciul
  2009-11-30  9:52   ` [PATCH] sctp: fix sctp_setsockopt_autoclose compile warning Andrei Pelinescu-Onciul
  0 siblings, 1 reply; 6+ messages in thread
From: Andrei Pelinescu-Onciul @ 2009-11-30  9:49 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: David S. Miller, linux-next, linux-kernel

On Nov 30, 2009 at 16:40, Stephen Rothwell <sfr@canb.auug.org.au> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] sctp: fix sctp_setsockopt_autoclose compile warning
  2009-11-30  9:49 ` Andrei Pelinescu-Onciul
@ 2009-11-30  9:52   ` Andrei Pelinescu-Onciul
  2009-11-30 10:06     ` David Miller
  2009-12-01 19:02     ` Vlad Yasevich
  0 siblings, 2 replies; 6+ messages in thread
From: Andrei Pelinescu-Onciul @ 2009-11-30  9:52 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: David S. Miller, Vlad Yasevich, linux-next, linux-kernel,
	linux-sctp

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 <andrei@iptel.org>
---
 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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] sctp: fix sctp_setsockopt_autoclose compile warning
  2009-11-30  9:52   ` [PATCH] sctp: fix sctp_setsockopt_autoclose compile warning Andrei Pelinescu-Onciul
@ 2009-11-30 10:06     ` David Miller
  2009-12-01 19:02     ` Vlad Yasevich
  1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2009-11-30 10:06 UTC (permalink / raw)
  To: andrei; +Cc: sfr, vladislav.yasevich, linux-next, linux-kernel, linux-sctp


Please CC: all networking patches to netdev@vger.kernel.org

Thank you.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] sctp: fix sctp_setsockopt_autoclose compile warning
  2009-11-30  9:52   ` [PATCH] sctp: fix sctp_setsockopt_autoclose compile warning Andrei Pelinescu-Onciul
  2009-11-30 10:06     ` David Miller
@ 2009-12-01 19:02     ` Vlad Yasevich
  2009-12-02  9:17       ` David Miller
  1 sibling, 1 reply; 6+ messages in thread
From: Vlad Yasevich @ 2009-12-01 19:02 UTC (permalink / raw)
  To: Andrei Pelinescu-Onciul
  Cc: Stephen Rothwell, David S. Miller, linux-next, linux-kernel,
	linux-sctp



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 <andrei@iptel.org>

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;
>  }

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] sctp: fix sctp_setsockopt_autoclose compile warning
  2009-12-01 19:02     ` Vlad Yasevich
@ 2009-12-02  9:17       ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2009-12-02  9:17 UTC (permalink / raw)
  To: vladislav.yasevich; +Cc: andrei, sfr, linux-next, linux-kernel, linux-sctp

From: Vlad Yasevich <vladislav.yasevich@hp.com>
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 <andrei@iptel.org>
> 
> Ack.

Applied, but please submit networking patches always CC:'d
to netdev@vger.kernel.org otherwise they won't get logged
in patchwork and therefore are most likely to get lost.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-12-02  9:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-30  5:40 linux-next: net tree build warning Stephen Rothwell
2009-11-30  9:49 ` Andrei Pelinescu-Onciul
2009-11-30  9:52   ` [PATCH] sctp: fix sctp_setsockopt_autoclose compile warning Andrei Pelinescu-Onciul
2009-11-30 10:06     ` David Miller
2009-12-01 19:02     ` Vlad Yasevich
2009-12-02  9:17       ` David Miller

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).