Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1653076
| From | Joe Perches <joe@perches.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] [media] vb2: core: Lower the log level of debug outputs |
| Date | 2017-05-30 12:20 +0200 |
| Message-ID | <tMMpQ-63R-23@gated-at.bofh.it> (permalink) |
| References | <tMLWO-5BU-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, 2017-05-30 at 18:49 +0900, Hirokazu Honda wrote:
> Some debug output whose log level is set 1 flooded the log.
> Their log level is lowered to find the important log easily.
Maybe use pr_debug instead?
Perhaps it would be better to change the level to a bitmap
so these can be more individually controlled.
Maybe add MODULE_PARM_DESC too.
Perhaps something like below (without the pr_debug conversion)
---
drivers/media/v4l2-core/videobuf2-core.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
index 94afbbf92807..88ae2b238115 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -31,12 +31,13 @@
static int debug;
module_param(debug, int, 0644);
+MODULE_PARM_DESC(debug, "debugging output control bitmap (values from 0-31)")
-#define dprintk(level, fmt, arg...) \
- do { \
- if (debug >= level) \
- pr_info("vb2-core: %s: " fmt, __func__, ## arg); \
- } while (0)
+#define dprintk(level, fmt, ...) \
+do { \
+ if (debug & BIT(level)) \
+ pr_info("vb2-core: %s: " fmt, __func__, ##__VA_ARGS__); \
+} while (0)
#ifdef CONFIG_VIDEO_ADV_DEBUG
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2] [media] vb2: core: Lower the log level of debug outputs Hirokazu Honda <hiroh@chromium.org> - 2017-05-30 11:50 +0200
Re: [PATCH v2] [media] vb2: core: Lower the log level of debug outputs Joe Perches <joe@perches.com> - 2017-05-30 12:20 +0200
Re: [PATCH v2] [media] vb2: core: Lower the log level of debug outputs Joe Perches <joe@perches.com> - 2017-05-31 04:20 +0200
Re: [PATCH v2] [media] vb2: core: Lower the log level of debug outputs Joe Perches <joe@perches.com> - 2017-05-31 06:10 +0200
Re: [PATCH v2] [media] vb2: core: Lower the log level of debug outputs Hans Verkuil <hverkuil@xs4all.nl> - 2017-06-07 11:10 +0200
csiph-web