dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm: modes: add missing [drm] to message printing
@ 2016-02-04 14:03 LABBE Corentin
  2016-02-04 15:28 ` Lukas Wunner
  2016-02-09  9:45 ` Daniel Vetter
  0 siblings, 2 replies; 4+ messages in thread
From: LABBE Corentin @ 2016-02-04 14:03 UTC (permalink / raw)
  To: airlied; +Cc: LABBE Corentin, dri-devel, linux-kernel

The warning message in drm_mode_parse_command_line_for_connector miss
the [drm] at beginning.
This patch add it and take the opportunity to convert
printk(KERN_WARNING to pr_warn()

Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
---
 drivers/gpu/drm/drm_modes.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index 20775c0..f7448a5 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -1371,8 +1371,7 @@ bool drm_mode_parse_command_line_for_connector(const char *mode_option,
 	}
 done:
 	if (i >= 0) {
-		printk(KERN_WARNING
-			"parse error at position %i in video mode '%s'\n",
+		pr_warn("[drm] parse error at position %i in video mode '%s'\n",
 			i, name);
 		mode->specified = false;
 		return false;
-- 
2.4.10

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

* Re: [PATCH] drm: modes: add missing [drm] to message printing
  2016-02-04 14:03 [PATCH] drm: modes: add missing [drm] to message printing LABBE Corentin
@ 2016-02-04 15:28 ` Lukas Wunner
  2016-02-04 17:08   ` Jani Nikula
  2016-02-09  9:45 ` Daniel Vetter
  1 sibling, 1 reply; 4+ messages in thread
From: Lukas Wunner @ 2016-02-04 15:28 UTC (permalink / raw)
  To: LABBE Corentin; +Cc: dri-devel

Hi,

On Thu, Feb 04, 2016 at 03:03:52PM +0100, LABBE Corentin wrote:
> The warning message in drm_mode_parse_command_line_for_connector miss
> the [drm] at beginning.
> This patch add it and take the opportunity to convert
> printk(KERN_WARNING to pr_warn()
> 
> Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
> ---
>  drivers/gpu/drm/drm_modes.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> index 20775c0..f7448a5 100644
> --- a/drivers/gpu/drm/drm_modes.c
> +++ b/drivers/gpu/drm/drm_modes.c
> @@ -1371,8 +1371,7 @@ bool drm_mode_parse_command_line_for_connector(const char *mode_option,
>  	}
>  done:
>  	if (i >= 0) {
> -		printk(KERN_WARNING
> -			"parse error at position %i in video mode '%s'\n",
> +		pr_warn("[drm] parse error at position %i in video mode '%s'\n",
>  			i, name);

Hm, maybe it's warranted to add a DRM_WARNING macro to include/drm/drmP.h
and use that instead?

Best regards,

Lukas

>  		mode->specified = false;
>  		return false;
> -- 
> 2.4.10
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm: modes: add missing [drm] to message printing
  2016-02-04 15:28 ` Lukas Wunner
@ 2016-02-04 17:08   ` Jani Nikula
  0 siblings, 0 replies; 4+ messages in thread
From: Jani Nikula @ 2016-02-04 17:08 UTC (permalink / raw)
  To: Lukas Wunner, LABBE Corentin; +Cc: dri-devel

On Thu, 04 Feb 2016, Lukas Wunner <lukas@wunner.de> wrote:
> Hi,
>
> On Thu, Feb 04, 2016 at 03:03:52PM +0100, LABBE Corentin wrote:
>> The warning message in drm_mode_parse_command_line_for_connector miss
>> the [drm] at beginning.
>> This patch add it and take the opportunity to convert
>> printk(KERN_WARNING to pr_warn()
>> 
>> Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
>> ---
>>  drivers/gpu/drm/drm_modes.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
>> index 20775c0..f7448a5 100644
>> --- a/drivers/gpu/drm/drm_modes.c
>> +++ b/drivers/gpu/drm/drm_modes.c
>> @@ -1371,8 +1371,7 @@ bool drm_mode_parse_command_line_for_connector(const char *mode_option,
>>  	}
>>  done:
>>  	if (i >= 0) {
>> -		printk(KERN_WARNING
>> -			"parse error at position %i in video mode '%s'\n",
>> +		pr_warn("[drm] parse error at position %i in video mode '%s'\n",
>>  			i, name);
>
> Hm, maybe it's warranted to add a DRM_WARNING macro to include/drm/drmP.h
> and use that instead?

I think it's good as-is for now. We have this all over the place, and
I'd rather see a concerted effort moving away from all this custom stuff
than having a one-off definition for a single patch. And that probably
needs some more discussion, not worth blocking this patch for that.

For pr_warn and friends, one approach is defining pr_fmt() macro at the
top.


BR,
Jani.




>
> Best regards,
>
> Lukas
>
>>  		mode->specified = false;
>>  		return false;
>> -- 
>> 2.4.10
>> 
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm: modes: add missing [drm] to message printing
  2016-02-04 14:03 [PATCH] drm: modes: add missing [drm] to message printing LABBE Corentin
  2016-02-04 15:28 ` Lukas Wunner
@ 2016-02-09  9:45 ` Daniel Vetter
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2016-02-09  9:45 UTC (permalink / raw)
  To: LABBE Corentin; +Cc: linux-kernel, dri-devel

On Thu, Feb 04, 2016 at 03:03:52PM +0100, LABBE Corentin wrote:
> The warning message in drm_mode_parse_command_line_for_connector miss
> the [drm] at beginning.
> This patch add it and take the opportunity to convert
> printk(KERN_WARNING to pr_warn()
> 
> Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>

Applied to drm-misc, thanks.
-Daniel

> ---
>  drivers/gpu/drm/drm_modes.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> index 20775c0..f7448a5 100644
> --- a/drivers/gpu/drm/drm_modes.c
> +++ b/drivers/gpu/drm/drm_modes.c
> @@ -1371,8 +1371,7 @@ bool drm_mode_parse_command_line_for_connector(const char *mode_option,
>  	}
>  done:
>  	if (i >= 0) {
> -		printk(KERN_WARNING
> -			"parse error at position %i in video mode '%s'\n",
> +		pr_warn("[drm] parse error at position %i in video mode '%s'\n",
>  			i, name);
>  		mode->specified = false;
>  		return false;
> -- 
> 2.4.10
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2016-02-09  9:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-04 14:03 [PATCH] drm: modes: add missing [drm] to message printing LABBE Corentin
2016-02-04 15:28 ` Lukas Wunner
2016-02-04 17:08   ` Jani Nikula
2016-02-09  9:45 ` Daniel Vetter

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