Netdev List
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: netdev@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] af_key: suppress a warning for 64k pages.
Date: Wed, 31 Oct 2007 14:59:54 +1100	[thread overview]
Message-ID: <20071031145954.fe106f73.sfr@canb.auug.org.au> (raw)

On PowerPC allmodconfig build we get this:

net/key/af_key.c:400: warning: comparison is always false due to limited range of data type

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 net/key/af_key.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/net/key/af_key.c b/net/key/af_key.c
index 7969f8a..7da6c1a 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -397,8 +397,11 @@ static inline int verify_sec_ctx_len(void *p)
 	struct sadb_x_sec_ctx *sec_ctx = (struct sadb_x_sec_ctx *)p;
 	int len;
 
+	/* sadb_x_ctx_len is uint16_t */
+#if PAGE_SIZE < (1 << 16)
 	if (sec_ctx->sadb_x_ctx_len > PAGE_SIZE)
 		return -EINVAL;
+#endif
 
 	len = pfkey_sec_ctx_len(sec_ctx);
 
-- 
1.5.3.4


             reply	other threads:[~2007-10-31  3:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-31  3:59 Stephen Rothwell [this message]
2007-10-31  4:08 ` [PATCH] af_key: suppress a warning for 64k pages David Miller
2007-10-31  4:34   ` Stephen Rothwell
2007-10-31  4:42     ` David Miller
2007-10-31  5:24       ` Stephen Rothwell
2007-10-31  6:58         ` 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=20071031145954.fe106f73.sfr@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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