lkml.org 
[lkml]   [2013]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 05/11] random: declare trickle_count unsigned
We cheerfully overflow these variables (at least where "int"
is 32 bits wide), so pedantically they should be unsigned.

Cc: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Price <price@mit.edu>
---
drivers/char/random.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/random.c b/drivers/char/random.c
index 85f5fce..04a117a 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -296,7 +296,7 @@ static int random_write_wakeup_thresh = 128;

static int trickle_thresh __read_mostly = INPUT_POOL_WORDS * 28;

-static DEFINE_PER_CPU(int, trickle_count);
+static DEFINE_PER_CPU(unsigned int, trickle_count);

/*
* A pool of size .poolwords is stirred with a primitive polynomial
--
1.8.3.2


\
 
 \ /
  Last update: 2013-11-08 01:21    [W:0.167 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site