LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jiri Kosina <jikos@jikos.cz>
To: Adrian Bunk <bunk@stusta.de>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org,
	linux-input@atrey.karlin.mff.cuni.cz
Subject: Re: [RFC: -mm patch] CONFIG_INPUT_DEBUG improvements
Date: Tue, 30 Jan 2007 16:07:04 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.64.0701301603590.9448@twin.jikos.cz> (raw)
In-Reply-To: <20070130011156.GD3754@stusta.de>

On Tue, 30 Jan 2007, Adrian Bunk wrote:

> This patch contains the following CONFIG_INPUT_DEBUG improvements:
> - remove Makefile code for the nonexisting CONFIG_INPUT_DEBUG
> - simpler Makefile for hid-debug.o
> - replace all HID debug #define's with CONFIG_INPUT_DEBUG

Adrian,

thanks for the patch. In seems broken to me though (as I have written 
accidentaly in different mail, so resending for mailinglists to get it) - 
the option that should replace the legacy DEBUG macro should be 
CONFIG_HID_DEBUG, not CONFIG_INPUT_DEBUG - your patch gets it right only 
on some places.

I applied the patch below to hid tree. Thanks.


HID: move away from DEBUG defines in favor of CONFIG_HID_DEBUG

CONFIG_INPUT_DEBUG is non-existent option, so remove anything depending
on it.

Also, as we have new CONFIG_HID_DEBUG, this should be used on places
where ifdef DEBUG was used before.

Suggested by Adrian Bunk.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>

---
commit c6bc8f433a5a6aec13b4d1aa64c980e8f5c0badc
tree 291a94074fea15b714ce66eacad2827c80eae28f
parent 6015269d31d8d07b80ef22000ba1d21feed1e537
author Jiri Kosina <jkosina@suse.cz> Tue, 30 Jan 2007 16:02:24 +0100
committer Jiri Kosina <jkosina@suse.cz> Tue, 30 Jan 2007 16:02:24 +0100

 drivers/hid/Makefile    |   15 ++-------------
 drivers/hid/hid-core.c  |    6 ++----
 drivers/hid/hid-debug.c |    1 -
 drivers/hid/hid-input.c |    6 ++----
 4 files changed, 6 insertions(+), 22 deletions(-)

diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile
index 84c823e..52e97d8 100644
--- a/drivers/hid/Makefile
+++ b/drivers/hid/Makefile
@@ -1,19 +1,8 @@
 #
 # Makefile for the HID driver
 #
-
-# Multipart objects.
-hid-objs	:= hid-core.o hid-input.o
-
-# Optional parts of multipart objects.
-ifeq ($(CONFIG_HID_DEBUG),y)
-hid-objs	+= hid-debug.o
-endif
-
-ifeq ($(CONFIG_INPUT_DEBUG),y)
-EXTRA_CFLAGS += -DDEBUG
-endif
-
+hid-objs			:= hid-core.o hid-input.o
 
 obj-$(CONFIG_HID)		+= hid.o
+hid-$(CONFIG_HID_DEBUG)		+= hid-debug.o
 
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 4648733..d848db6 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -28,8 +28,6 @@
 #include <linux/input.h>
 #include <linux/wait.h>
 
-#undef DEBUG_DATA
-
 #include <linux/hid.h>
 #include <linux/hiddev.h>
 #include <linux/hid-debug.h>
@@ -950,7 +948,7 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i
 		return -1;
 	}
 
-#ifdef DEBUG_DATA
+#ifdef CONFIG_HID_DEBUG
 	printk(KERN_DEBUG __FILE__ ": report (size %u) (%snumbered)\n", size, report_enum->numbered ? "" : "un");
 #endif
 
@@ -960,7 +958,7 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i
 		size--;
 	}
 
-#ifdef DEBUG_DATA
+#ifdef CONFIG_HID_DEBUG
 	{
 		int i;
 		printk(KERN_DEBUG __FILE__ ": report %d (size %u) = ", n, size);
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
index d6abe34..89241be 100644
--- a/drivers/hid/hid-debug.c
+++ b/drivers/hid/hid-debug.c
@@ -28,7 +28,6 @@
  * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
  */
 
-//#include <linux/input.h>
 #include <linux/hid.h>
 
 struct hid_usage_entry {
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 2301f98..1c7376a 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -31,8 +31,6 @@
 #include <linux/slab.h>
 #include <linux/kernel.h>
 
-#undef DEBUG
-
 #include <linux/hid.h>
 #include <linux/hid-debug.h>
 
@@ -248,7 +246,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
 
 	field->hidinput = hidinput;
 
-#ifdef DEBUG
+#ifdef CONFIG_HID_DEBUG
 	printk(KERN_DEBUG "Mapping: ");
 	hid_resolv_usage(usage->hid);
 	printk(" ---> ");
@@ -683,7 +681,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
 	return;
 
 ignore:
-#ifdef DEBUG
+#ifdef CONFIG_HID_DEBUG
 	printk("IGNORED\n");
 #endif
 	return;

-- 
Jiri Kosina

  reply	other threads:[~2007-01-30 15:08 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-28  7:49 2.6.20-rc6-mm1 Andrew Morton
2007-01-28 10:08 ` Unable to select IPV6 [Was: 2.6.20-rc6-mm1] Jiri Slaby
2007-01-28 16:19   ` [-mm patch] fix GFS2 circular dependency Adrian Bunk
2007-01-29  1:55     ` Randy Dunlap
2007-01-29  9:12     ` Steven Whitehouse
2007-01-28 10:25 ` 2.6.20-rc6-mm1 Jiri Slaby
2007-01-30  7:27   ` 2.6.20-rc6-mm1 Andrew Morton
2007-01-30 19:30     ` 2.6.20-rc6-mm1 Andrew Morton
2007-01-30 20:10       ` 2.6.20-rc6-mm1 Jiri Slaby
2007-01-30 20:22       ` 2.6.20-rc6-mm1 Pierre Ossman
2007-01-30 20:50       ` 2.6.20-rc6-mm1 Anton Altaparmakov
2007-01-28 11:01 ` elevator oops [Was: 2.6.20-rc6-mm1] Jiri Slaby
2007-01-28 17:41   ` Jiri Slaby
2007-02-05 11:54   ` Jens Axboe
2007-01-28 14:59 ` 2.6.20-rc6-mm1: linker error with arch_setup_additional_pages thunder7
2007-01-28 16:56 ` 2.6.20-rc6-mm1 Martin J. Bligh
2007-01-28 23:01   ` 2.6.20-rc6-mm1 Andrew Morton
2007-01-28 23:23     ` 2.6.20-rc6-mm1 Martin J. Bligh
2007-01-28 23:38       ` 2.6.20-rc6-mm1 Andrew Morton
2007-01-30  2:42     ` 2.6.20-rc6-mm1 Suparna Bhattacharya
2007-01-30  2:42       ` 2.6.20-rc6-mm1 Andrew Morton
2007-01-30  3:26         ` 2.6.20-rc6-mm1 Martin Bligh
2007-01-28 17:02 ` 2.6.20-rc6-mm1 Martin J. Bligh
2007-01-28 17:04 ` 2.6.20-rc6-mm1 Martin J. Bligh
2007-01-28 19:04 ` [-mm patch] fix CONFIG_SATA_SIS=y compile error Adrian Bunk
2007-01-28 19:41 ` 2.6.20-rc6-mm1 (build) Randy Dunlap
2007-01-28 22:21   ` [2.6 patch] NF_CONNTRACK_H323 must depend on (IPV6 || IPV6=n) Adrian Bunk
2007-01-28 23:53     ` David Miller
2007-01-29  0:00       ` Adrian Bunk
2007-01-29  0:04         ` David Miller
2007-01-29  0:21           ` Adrian Bunk
2007-01-29  1:22             ` Randy Dunlap
2007-01-30 17:13             ` Patrick McHardy
2007-01-28 22:31 ` 2.6.20-rc6-mm1 Michal Piotrowski
2007-01-28 23:10   ` 2.6.20-rc6-mm1 Andrew Morton
2007-01-29  5:17   ` 2.6.20-rc6-mm1 Herbert Xu
2007-01-29  5:29     ` 2.6.20-rc6-mm1 Herbert Xu
2007-01-29  6:43       ` 2.6.20-rc6-mm1 Andrew Morton
2007-01-29  7:21         ` 2.6.20-rc6-mm1 Herbert Xu
2007-01-29  8:35           ` 2.6.20-rc6-mm1 Ingo Molnar
2007-01-29  2:50 ` [PATCH -mm] fix DocBook build Don Mullis
2007-01-30  1:11 ` [-mm patch] vmi: cleanups Adrian Bunk
2007-01-30  4:56   ` Zachary Amsden
2007-01-30  1:11 ` [-mm patch] cx88-video.c: remove struct radionorms Adrian Bunk
2007-01-30  1:11 ` [RFC: -mm patch] CONFIG_INPUT_DEBUG improvements Adrian Bunk
2007-01-30 15:07   ` Jiri Kosina [this message]
2007-01-30 15:13     ` Adrian Bunk
2007-01-30  1:11 ` [-mm patch] drivers/char/pcmcia/ipwireless_cs_*: possible cleanups Adrian Bunk
2007-01-30  1:12 ` [RFC: -mm patch] #if 0 v4l_printk_ioctl_arg() Adrian Bunk
2007-02-06 22:12 ` [-mm patch] fs/proc/: make code static Adrian Bunk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0701301603590.9448@twin.jikos.cz \
    --to=jikos@jikos.cz \
    --cc=akpm@osdl.org \
    --cc=bunk@stusta.de \
    --cc=linux-input@atrey.karlin.mff.cuni.cz \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [RFC: -mm patch] CONFIG_INPUT_DEBUG improvements' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).