linux-sctp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrei Pelinescu-Onciul <andrei@iptel.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: "David S. Miller" <davem@davemloft.net>,
	Vlad Yasevich <vladislav.yasevich@hp.com>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-sctp@vger.kernel.org
Subject: [PATCH] sctp: fix sctp_setsockopt_autoclose compile warning
Date: Mon, 30 Nov 2009 09:52:50 +0000	[thread overview]
Message-ID: <20091130095250.GZ10897@shell.iptel.org> (raw)
In-Reply-To: <20091130094929.GY10897@shell.iptel.org>

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


       reply	other threads:[~2009-11-30  9:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20091130164015.9bb8f6a3.sfr@canb.auug.org.au>
     [not found] ` <20091130094929.GY10897@shell.iptel.org>
2009-11-30  9:52   ` Andrei Pelinescu-Onciul [this message]
2009-11-30 10:06     ` [PATCH] sctp: fix sctp_setsockopt_autoclose compile warning David Miller
2009-12-01 19:02     ` Vlad Yasevich
2009-12-02  9:17       ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091130095250.GZ10897@shell.iptel.org \
    --to=andrei@iptel.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-sctp@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=vladislav.yasevich@hp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).