lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0705301603200.10318@twin.jikos.cz>
Date:	Wed, 30 May 2007 16:08:14 +0200 (CEST)
From:	Jiri Kosina <jikos@...os.cz>
To:	Dmitry Torokhov <dtor@...ightbb.com>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: [PATCH] Input: i8042 - cleanup of debug code (was Re: 2.6.22-rc2-mm1)

(some irrelevant CCs dropped)

On Wed, 23 May 2007, Dmitry Torokhov wrote:

> It looks like you are now in the same position I was some time ago WRT 
> to debug information for i8042 - constantly asking people to enable 
> debug, recompile and send the results. May I recommend changing 
> CONFIG_HID_DEBUG to "default y if !EMBEDDED" and controlling debug 
> output via a module parameter? -ENOPATCH though...

Hi Dmitry,

I have just queued corresponding patch in HID tree.

BTW when looking at the i8042 code I have just noticed that the trivial 
cleanup below could be possible.



From: Jiri Kosina <jkosina@...e.cz>

Input: i8042 - cleanup of debug code
    
Debugging facility of i8042 is now toggled in runtime instead
of needing to recompile the kernel. Therefore the DEBUG macro
is useless (it's hardcoded to be defined anyway). Remove it.
    
Signed-off-by: Jiri Kosina <jkosina@...e.cz>

diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index 3888dc3..5c3405d 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -69,12 +69,9 @@ module_param_named(nopnp, i8042_nopnp, b
 MODULE_PARM_DESC(nopnp, "Do not use PNP to detect controller settings");
 #endif
 
-#define DEBUG
-#ifdef DEBUG
 static int i8042_debug;
 module_param_named(debug, i8042_debug, bool, 0600);
 MODULE_PARM_DESC(debug, "Turn i8042 debugging mode on and off");
-#endif
 
 #include "i8042.h"
 
diff --git a/drivers/input/serio/i8042.h b/drivers/input/serio/i8042.h
index b3eb7a7..eec4b32 100644
--- a/drivers/input/serio/i8042.h
+++ b/drivers/input/serio/i8042.h
@@ -106,7 +106,6 @@
  * Debug.
  */
 
-#ifdef DEBUG
 static unsigned long i8042_start_time;
 #define dbg_init() do { i8042_start_time = jiffies; } while (0)
 #define dbg(format, arg...) 							\
@@ -115,9 +114,4 @@ static unsigned long i8042_start_time;
 			printk(KERN_DEBUG __FILE__ ": " format " [%d]\n" ,	\
 	 			## arg, (int) (jiffies - i8042_start_time));	\
 	} while (0)
-#else
-#define dbg_init() do { } while (0)
-#define dbg(format, arg...) do {} while (0)
-#endif
-
 #endif /* _I8042_H */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ