* [PATCH 0/3] staging: line6: replace CONFIG_LINE6_USB_DEBUG with dyndbg
@ 2012-11-11 12:52 Stefan Hajnoczi
2012-11-11 12:52 ` [PATCH 1/3] staging: line6: replace DEBUG_MESSAGES() with dev_dbg() Stefan Hajnoczi
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2012-11-11 12:52 UTC (permalink / raw)
To: devel
Cc: Markus Grabner, Daniel Mack, Greg Kroah-Hartman, line6linux-devel,
linux-kernel, Stefan Hajnoczi
Daniel Mack <zonque@gmail.com> suggested the dyndbg mechanism which allows
dev_dbg() messages to be enabled/disabled at run-time. This is more powerful
than the compile-time CONFIG_LINE6_USB_DEBUG option.
This patch series converts debug messages to dev_dbg() and drops the obsolete
CONFIG_LINE6_USB_DEBUG option.
Stefan Hajnoczi (3):
staging: line6: replace DEBUG_MESSAGES() with dev_dbg()
staging: line6: drop unused DEBUG_MESSAGES() macro
staging: line6: drop unused CONFIG_LINE6_USB_DEBUG
drivers/staging/line6/Kconfig | 8 ------
drivers/staging/line6/driver.c | 6 ++---
drivers/staging/line6/driver.h | 6 -----
drivers/staging/line6/pod.c | 57 ++++++++++++++++--------------------------
drivers/staging/line6/variax.c | 12 ++++-----
5 files changed, 28 insertions(+), 61 deletions(-)
--
1.7.12.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] staging: line6: replace DEBUG_MESSAGES() with dev_dbg()
2012-11-11 12:52 [PATCH 0/3] staging: line6: replace CONFIG_LINE6_USB_DEBUG with dyndbg Stefan Hajnoczi
@ 2012-11-11 12:52 ` Stefan Hajnoczi
2012-11-14 14:40 ` Dan Carpenter
2012-11-11 12:52 ` [PATCH 2/3] staging: line6: drop unused DEBUG_MESSAGES() macro Stefan Hajnoczi
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Stefan Hajnoczi @ 2012-11-11 12:52 UTC (permalink / raw)
To: devel
Cc: Markus Grabner, Daniel Mack, Greg Kroah-Hartman, line6linux-devel,
linux-kernel, Stefan Hajnoczi
The dyndbg feature allows dev_dbg() calls to be enabled/disabled at
runtime and is therefore more convenient than static debug log messages.
Use dev_dbg() instead of the line6-specific DEBUG_MESSAGES() macro.
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
---
drivers/staging/line6/driver.c | 6 ++---
drivers/staging/line6/pod.c | 57 ++++++++++++++++--------------------------
drivers/staging/line6/variax.c | 12 ++++-----
3 files changed, 28 insertions(+), 47 deletions(-)
diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c
index ac11a3b..571f2ce 100644
--- a/drivers/staging/line6/driver.c
+++ b/drivers/staging/line6/driver.c
@@ -412,10 +412,8 @@ static void line6_data_received(struct urb *urb)
if (done < urb->actual_length) {
line6_midibuf_ignore(mb, done);
- DEBUG_MESSAGES(dev_err
- (line6->ifcdev,
- "%d %d buffer overflow - message skipped\n",
- done, urb->actual_length));
+ dev_dbg(line6->ifcdev, "%d %d buffer overflow - message skipped\n",
+ done, urb->actual_length);
}
for (;;) {
diff --git a/drivers/staging/line6/pod.c b/drivers/staging/line6/pod.c
index 9edd053..4a86f7a 100644
--- a/drivers/staging/line6/pod.c
+++ b/drivers/staging/line6/pod.c
@@ -252,25 +252,19 @@ void line6_pod_process_message(struct usb_line6_pod *pod)
break;
default:
- DEBUG_MESSAGES(dev_err
- (pod->
- line6.ifcdev,
- "unknown dump code %02X\n",
- pod->
- dumpreq.in_progress));
+ dev_dbg(pod->line6.ifcdev,
+ "unknown dump code %02X\n",
+ pod->dumpreq.in_progress);
}
line6_dump_finished(&pod->dumpreq);
pod_startup3(pod);
} else
- DEBUG_MESSAGES(dev_err
- (pod->line6.ifcdev,
- "wrong size of channel dump message (%d instead of %d)\n",
- pod->
- line6.message_length,
- (int)
- sizeof(pod->prog_data) +
- 7));
+ dev_dbg(pod->line6.ifcdev,
+ "wrong size of channel dump message (%d instead of %d)\n",
+ pod->line6.message_length,
+ (int)sizeof(pod->prog_data) +
+ 7);
break;
@@ -302,11 +296,9 @@ void line6_pod_process_message(struct usb_line6_pod *pod)
#undef PROCESS_SYSTEM_PARAM
default:
- DEBUG_MESSAGES(dev_err
- (pod->
- line6.ifcdev,
- "unknown tuner/system response %02X\n",
- buf[6]));
+ dev_dbg(pod->line6.ifcdev,
+ "unknown tuner/system response %02X\n",
+ buf[6]);
}
break;
@@ -321,25 +313,21 @@ void line6_pod_process_message(struct usb_line6_pod *pod)
break;
case POD_SYSEX_CLIP:
- DEBUG_MESSAGES(dev_err
- (pod->line6.ifcdev,
- "audio clipped\n"));
+ dev_dbg(pod->line6.ifcdev, "audio clipped\n");
pod->clipping.value = 1;
wake_up(&pod->clipping.wait);
break;
case POD_SYSEX_STORE:
- DEBUG_MESSAGES(dev_err
- (pod->line6.ifcdev,
- "message %02X not yet implemented\n",
- buf[5]));
+ dev_dbg(pod->line6.ifcdev,
+ "message %02X not yet implemented\n",
+ buf[5]);
break;
default:
- DEBUG_MESSAGES(dev_err
- (pod->line6.ifcdev,
- "unknown sysex message %02X\n",
- buf[5]));
+ dev_dbg(pod->line6.ifcdev,
+ "unknown sysex message %02X\n",
+ buf[5]);
}
} else
if (memcmp
@@ -352,9 +340,7 @@ void line6_pod_process_message(struct usb_line6_pod *pod)
buf[10];
pod_startup4(pod);
} else
- DEBUG_MESSAGES(dev_err
- (pod->line6.ifcdev,
- "unknown sysex header\n"));
+ dev_dbg(pod->line6.ifcdev, "unknown sysex header\n");
break;
@@ -362,9 +348,8 @@ void line6_pod_process_message(struct usb_line6_pod *pod)
break;
default:
- DEBUG_MESSAGES(dev_err
- (pod->line6.ifcdev,
- "POD: unknown message %02X\n", buf[0]));
+ dev_dbg(pod->line6.ifcdev, "POD: unknown message %02X\n",
+ buf[0]);
}
}
diff --git a/drivers/staging/line6/variax.c b/drivers/staging/line6/variax.c
index 1b85ecc..8df529f 100644
--- a/drivers/staging/line6/variax.c
+++ b/drivers/staging/line6/variax.c
@@ -262,10 +262,9 @@ void line6_variax_process_message(struct usb_line6_variax *variax)
2, VARIAX_DUMP_PASS3);
}
} else {
- DEBUG_MESSAGES(dev_err
- (variax->line6.ifcdev,
- "illegal length %d of model data\n",
- variax->line6.message_length));
+ dev_dbg(variax->line6.ifcdev,
+ "illegal length %d of model data\n",
+ variax->line6.message_length);
line6_dump_finished(&variax->dumpreq);
}
} else if (memcmp(buf + 1, variax_request_bank + 1,
@@ -295,9 +294,8 @@ void line6_variax_process_message(struct usb_line6_variax *variax)
break;
default:
- DEBUG_MESSAGES(dev_err
- (variax->line6.ifcdev,
- "Variax: unknown message %02X\n", buf[0]));
+ dev_dbg(variax->line6.ifcdev,
+ "Variax: unknown message %02X\n", buf[0]);
}
}
--
1.7.12.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] staging: line6: drop unused DEBUG_MESSAGES() macro
2012-11-11 12:52 [PATCH 0/3] staging: line6: replace CONFIG_LINE6_USB_DEBUG with dyndbg Stefan Hajnoczi
2012-11-11 12:52 ` [PATCH 1/3] staging: line6: replace DEBUG_MESSAGES() with dev_dbg() Stefan Hajnoczi
@ 2012-11-11 12:52 ` Stefan Hajnoczi
2012-11-11 12:52 ` [PATCH 3/3] staging: line6: drop unused CONFIG_LINE6_USB_DEBUG Stefan Hajnoczi
2012-11-11 12:54 ` [PATCH 0/3] staging: line6: replace CONFIG_LINE6_USB_DEBUG with dyndbg Stefan Hajnoczi
3 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2012-11-11 12:52 UTC (permalink / raw)
To: devel
Cc: Markus Grabner, Daniel Mack, Greg Kroah-Hartman, line6linux-devel,
linux-kernel, Stefan Hajnoczi
The DEBUG_MESSAGES() macro is no longer needed since dev_dbg() is now
used for debug messages.
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
---
drivers/staging/line6/driver.h | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/staging/line6/driver.h b/drivers/staging/line6/driver.h
index 35246cf..9dd8ff4 100644
--- a/drivers/staging/line6/driver.h
+++ b/drivers/staging/line6/driver.h
@@ -52,12 +52,6 @@
#define LINE6_CHANNEL_MASK 0x0f
-#ifdef CONFIG_LINE6_USB_DEBUG
-#define DEBUG_MESSAGES(x) (x)
-#else
-#define DEBUG_MESSAGES(x)
-#endif
-
#define MISSING_CASE \
printk(KERN_ERR "line6usb driver bug: missing case in %s:%d\n", \
__FILE__, __LINE__)
--
1.7.12.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] staging: line6: drop unused CONFIG_LINE6_USB_DEBUG
2012-11-11 12:52 [PATCH 0/3] staging: line6: replace CONFIG_LINE6_USB_DEBUG with dyndbg Stefan Hajnoczi
2012-11-11 12:52 ` [PATCH 1/3] staging: line6: replace DEBUG_MESSAGES() with dev_dbg() Stefan Hajnoczi
2012-11-11 12:52 ` [PATCH 2/3] staging: line6: drop unused DEBUG_MESSAGES() macro Stefan Hajnoczi
@ 2012-11-11 12:52 ` Stefan Hajnoczi
2012-11-11 12:54 ` [PATCH 0/3] staging: line6: replace CONFIG_LINE6_USB_DEBUG with dyndbg Stefan Hajnoczi
3 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2012-11-11 12:52 UTC (permalink / raw)
To: devel
Cc: Markus Grabner, Daniel Mack, Greg Kroah-Hartman, line6linux-devel,
linux-kernel, Stefan Hajnoczi
The CONFIG_LINE6_USB_DEBUG option is no longer relevant since dyndbg
dev_dbg() is now used instead of a compile-time decision whether to
enable debug messages or not.
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
---
drivers/staging/line6/Kconfig | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/staging/line6/Kconfig b/drivers/staging/line6/Kconfig
index 43120ff..a5ded12 100644
--- a/drivers/staging/line6/Kconfig
+++ b/drivers/staging/line6/Kconfig
@@ -23,14 +23,6 @@ menuconfig LINE6_USB
if LINE6_USB
-config LINE6_USB_DEBUG
- bool "print debug messages"
- default n
- help
- Say Y here to write debug messages to the syslog.
-
- If unsure, say N.
-
config LINE6_USB_DUMP_CTRL
bool "dump control messages"
default n
--
1.7.12.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] staging: line6: replace CONFIG_LINE6_USB_DEBUG with dyndbg
2012-11-11 12:52 [PATCH 0/3] staging: line6: replace CONFIG_LINE6_USB_DEBUG with dyndbg Stefan Hajnoczi
` (2 preceding siblings ...)
2012-11-11 12:52 ` [PATCH 3/3] staging: line6: drop unused CONFIG_LINE6_USB_DEBUG Stefan Hajnoczi
@ 2012-11-11 12:54 ` Stefan Hajnoczi
3 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2012-11-11 12:54 UTC (permalink / raw)
To: devel
Cc: Markus Grabner, Daniel Mack, Greg Kroah-Hartman, line6linux-devel,
linux-kernel, Stefan Hajnoczi
On Sun, Nov 11, 2012 at 1:52 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> Daniel Mack <zonque@gmail.com> suggested the dyndbg mechanism which allows
> dev_dbg() messages to be enabled/disabled at run-time. This is more powerful
> than the compile-time CONFIG_LINE6_USB_DEBUG option.
>
> This patch series converts debug messages to dev_dbg() and drops the obsolete
> CONFIG_LINE6_USB_DEBUG option.
>
> Stefan Hajnoczi (3):
> staging: line6: replace DEBUG_MESSAGES() with dev_dbg()
> staging: line6: drop unused DEBUG_MESSAGES() macro
> staging: line6: drop unused CONFIG_LINE6_USB_DEBUG
>
> drivers/staging/line6/Kconfig | 8 ------
> drivers/staging/line6/driver.c | 6 ++---
> drivers/staging/line6/driver.h | 6 -----
> drivers/staging/line6/pod.c | 57 ++++++++++++++++--------------------------
> drivers/staging/line6/variax.c | 12 ++++-----
> 5 files changed, 28 insertions(+), 61 deletions(-)
I forgot to mention these patches apply on top of the "staging: line6:
checkpatch.pl cleanups" series I sent earlier today.
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] staging: line6: replace DEBUG_MESSAGES() with dev_dbg()
2012-11-11 12:52 ` [PATCH 1/3] staging: line6: replace DEBUG_MESSAGES() with dev_dbg() Stefan Hajnoczi
@ 2012-11-14 14:40 ` Dan Carpenter
0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2012-11-14 14:40 UTC (permalink / raw)
To: Stefan Hajnoczi
Cc: devel, line6linux-devel, linux-kernel, Daniel Mack,
Markus Grabner, Greg Kroah-Hartman
On Sun, Nov 11, 2012 at 01:52:24PM +0100, Stefan Hajnoczi wrote:
> + dev_dbg(pod->line6.ifcdev,
> + "wrong size of channel dump message (%d instead of %d)\n",
> + pod->line6.message_length,
> + (int)sizeof(pod->prog_data) +
> + 7);
Better to get rid of the cast. You're already over the 80 character
limit so putting the "7);" on the line before is ok.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-11-14 14:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-11 12:52 [PATCH 0/3] staging: line6: replace CONFIG_LINE6_USB_DEBUG with dyndbg Stefan Hajnoczi
2012-11-11 12:52 ` [PATCH 1/3] staging: line6: replace DEBUG_MESSAGES() with dev_dbg() Stefan Hajnoczi
2012-11-14 14:40 ` Dan Carpenter
2012-11-11 12:52 ` [PATCH 2/3] staging: line6: drop unused DEBUG_MESSAGES() macro Stefan Hajnoczi
2012-11-11 12:52 ` [PATCH 3/3] staging: line6: drop unused CONFIG_LINE6_USB_DEBUG Stefan Hajnoczi
2012-11-11 12:54 ` [PATCH 0/3] staging: line6: replace CONFIG_LINE6_USB_DEBUG with dyndbg Stefan Hajnoczi
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).