Messages in this thread Patch in this message | | | Date | Thu, 7 Nov 2013 18:58:47 -0500 | From | Greg Price <> | 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
| |