From: Joe Perches <joe@perches.com>
To: Hirokazu Honda <hiroh@chromium.org>,
Pawel Osciak <pawel@osciak.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] [media] vb2: core: Lower the log level of debug outputs
Date: Tue, 30 May 2017 03:19:32 -0700 [thread overview]
Message-ID: <1496139572.2618.19.camel@perches.com> (raw)
In-Reply-To: <20170530094901.1807-1-hiroh@chromium.org>
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
next prev parent reply other threads:[~2017-05-30 10:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-30 9:49 [PATCH v2] [media] vb2: core: Lower the log level of debug outputs Hirokazu Honda
2017-05-30 10:19 ` Joe Perches [this message]
[not found] ` <CAO5uPHO7GwxCTk2OqQA5NfrL0-Jyt5SB-jVpeUA_eCrqR7u5xA@mail.gmail.com>
2017-05-31 2:16 ` Joe Perches
[not found] ` <CAO5uPHPWGABuKf3FuAky2BRx+9E=n-QhZ94RPQ7wEuHAwC1qGg@mail.gmail.com>
2017-05-31 4:06 ` Joe Perches
2017-06-07 9:01 ` Hans Verkuil
2017-06-08 3:24 ` Hirokazu Honda
2017-06-08 4:39 ` Tomasz Figa
2017-06-08 5:16 ` Joe Perches
2017-06-08 5:24 ` Tomasz Figa
2017-06-08 5:33 ` Joe Perches
2017-06-27 22:57 ` Hirokazu Honda
2017-07-28 13:13 ` Hans Verkuil
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=1496139572.2618.19.camel@perches.com \
--to=joe@perches.com \
--cc=hiroh@chromium.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mchehab@kernel.org \
--cc=pawel@osciak.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.