linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH] vb2: use pr_info instead of pr_debug
@ 2014-08-08 12:59 Hans Verkuil
  2014-08-18  9:13 ` Marek Szyprowski
  0 siblings, 1 reply; 2+ messages in thread
From: Hans Verkuil @ 2014-08-08 12:59 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Marek Szyprowski, Pawel Osciak

Modern kernels enable dynamic printk support, which is fine, except when it is
combined with a debug module option. Enabling debug in videobuf2-core now produces
no debugging unless it is also enabled through the dynamic printk support in debugfs.

Either use a debug module option + pr_info, or use pr_debug without a debug module
option. In this case the fact that you can set various debug levels is very useful,
so I believe that for videobuf2-core.c we should use pr_info.

The mix of the two is very confusing: I've spent too much time already trying to
figure out why I am not seeing any debug output in the kernel log when I do:

	echo 1 >/sys/modules/videobuf2_core/parameters/debug

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
index 0e3d927..0b59735 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -36,7 +36,7 @@ module_param(debug, int, 0644);
 #define dprintk(level, fmt, arg...)					      \
 	do {								      \
 		if (debug >= level)					      \
-			pr_debug("vb2: %s: " fmt, __func__, ## arg); \
+			pr_info("vb2: %s: " fmt, __func__, ## arg); \
 	} while (0)
 
 #ifdef CONFIG_VIDEO_ADV_DEBUG

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RFC PATCH] vb2: use pr_info instead of pr_debug
  2014-08-08 12:59 [RFC PATCH] vb2: use pr_info instead of pr_debug Hans Verkuil
@ 2014-08-18  9:13 ` Marek Szyprowski
  0 siblings, 0 replies; 2+ messages in thread
From: Marek Szyprowski @ 2014-08-18  9:13 UTC (permalink / raw)
  To: Hans Verkuil, Linux Media Mailing List; +Cc: Pawel Osciak

Hello,

On 2014-08-08 14:59, Hans Verkuil wrote:
> Modern kernels enable dynamic printk support, which is fine, except when it is
> combined with a debug module option. Enabling debug in videobuf2-core now produces
> no debugging unless it is also enabled through the dynamic printk support in debugfs.
>
> Either use a debug module option + pr_info, or use pr_debug without a debug module
> option. In this case the fact that you can set various debug levels is very useful,
> so I believe that for videobuf2-core.c we should use pr_info.
>
> The mix of the two is very confusing: I've spent too much time already trying to
> figure out why I am not seeing any debug output in the kernel log when I do:
>
> 	echo 1 >/sys/modules/videobuf2_core/parameters/debug
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>

> diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
> index 0e3d927..0b59735 100644
> --- a/drivers/media/v4l2-core/videobuf2-core.c
> +++ b/drivers/media/v4l2-core/videobuf2-core.c
> @@ -36,7 +36,7 @@ module_param(debug, int, 0644);
>   #define dprintk(level, fmt, arg...)					      \
>   	do {								      \
>   		if (debug >= level)					      \
> -			pr_debug("vb2: %s: " fmt, __func__, ## arg); \
> +			pr_info("vb2: %s: " fmt, __func__, ## arg); \
>   	} while (0)
>   
>   #ifdef CONFIG_VIDEO_ADV_DEBUG
>

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-18  9:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-08 12:59 [RFC PATCH] vb2: use pr_info instead of pr_debug Hans Verkuil
2014-08-18  9:13 ` Marek Szyprowski

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).