]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
random: make it possible to enable debugging without rebuild
authorJiri Kosina <jkosina@suse.cz>
Thu, 25 Oct 2012 01:15:24 +0000 (12:15 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 25 Oct 2012 03:14:56 +0000 (14:14 +1100)
The module parameter that turns debugging mode (which basically means
printing a few extra lines during runtime) is in '#if 0' block.  Forcing
everyone who would like to see how entropy is behaving on his system to
rebuild seems to be a little bit too harsh.

If we were concerned about speed, we could potentially turn 'debug' into a
static key, but I don't think it's necessary.

Drop the '#if 0' block to allow using the 'debug' parameter without
rebuilding.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/char/random.c

index b86eae9b77dfaeb04dd2d4efefd6ebc01b9e0a93..9ac4443a185427c763b77b1e74ab6bdd2ff1455c 100644 (file)
@@ -399,7 +399,6 @@ static DECLARE_WAIT_QUEUE_HEAD(random_read_wait);
 static DECLARE_WAIT_QUEUE_HEAD(random_write_wait);
 static struct fasync_struct *fasync;
 
-#if 0
 static bool debug;
 module_param(debug, bool, 0644);
 #define DEBUG_ENT(fmt, arg...) do { \
@@ -410,9 +409,6 @@ module_param(debug, bool, 0644);
                blocking_pool.entropy_count,\
                nonblocking_pool.entropy_count,\
                ## arg); } while (0)
-#else
-#define DEBUG_ENT(fmt, arg...) do {} while (0)
-#endif
 
 /**********************************************************************
  *