Netdev List
 help / color / mirror / Atom feed
* [PATCH] af_key: suppress a warning for 64k pages.
@ 2007-10-31  3:59 Stephen Rothwell
  2007-10-31  4:08 ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2007-10-31  3:59 UTC (permalink / raw)
  To: netdev; +Cc: LKML

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


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

end of thread, other threads:[~2007-10-31  6:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-31  3:59 [PATCH] af_key: suppress a warning for 64k pages Stephen Rothwell
2007-10-31  4:08 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox