LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] serial: pl011: format long message string into lines
@ 2020-03-13  6:56 WANG Wenhu
  2020-03-13  7:03 ` Jiri Slaby
  0 siblings, 1 reply; 3+ messages in thread
From: WANG Wenhu @ 2020-03-13  6:56 UTC (permalink / raw)
  To: Russell King, Greg Kroah-Hartman, Jiri Slaby, linux-serial, linux-kernel
  Cc: trivial, WANG Wenhu

Separate the message string into lines for pl011_probe_dt_alias()
to make it better comply with kernel coding style, and also, make
it more readable.

It would still be grep friendly for the separated format.

Signed-off-by: WANG Wenhu <wenhu.wang@vivo.com>
---
 drivers/tty/serial/amba-pl011.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 2296bb0f9578..e693b7ac5a3a 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -2523,7 +2523,8 @@ static int pl011_probe_dt_alias(int index, struct device *dev)
 	}
 
 	if (seen_dev_with_alias && seen_dev_without_alias)
-		dev_warn(dev, "aliased and non-aliased serial devices found in device tree. Serial port enumeration may be unpredictable.\n");
+		dev_warn(dev, "aliased and non-aliased serial devices found in device tree." \
+			"Serial port enumeration may be unpredictable.\n");
 
 	return ret;
 }
-- 
2.17.1


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

* Re: [PATCH] serial: pl011: format long message string into lines
  2020-03-13  6:56 [PATCH] serial: pl011: format long message string into lines WANG Wenhu
@ 2020-03-13  7:03 ` Jiri Slaby
  2020-03-13  7:30   ` 王文虎
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Slaby @ 2020-03-13  7:03 UTC (permalink / raw)
  To: WANG Wenhu, Russell King, Greg Kroah-Hartman, linux-serial, linux-kernel
  Cc: trivial

On 13. 03. 20, 7:56, WANG Wenhu wrote:
> Separate the message string into lines for pl011_probe_dt_alias()
> to make it better comply with kernel coding style, and also, make
> it more readable.
> 
> It would still be grep friendly for the separated format.
> 
> Signed-off-by: WANG Wenhu <wenhu.wang@vivo.com>
> ---
>  drivers/tty/serial/amba-pl011.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
> index 2296bb0f9578..e693b7ac5a3a 100644
> --- a/drivers/tty/serial/amba-pl011.c
> +++ b/drivers/tty/serial/amba-pl011.c
> @@ -2523,7 +2523,8 @@ static int pl011_probe_dt_alias(int index, struct device *dev)
>  	}
>  
>  	if (seen_dev_with_alias && seen_dev_without_alias)
> -		dev_warn(dev, "aliased and non-aliased serial devices found in device tree. Serial port enumeration may be unpredictable.\n");
> +		dev_warn(dev, "aliased and non-aliased serial devices found in device tree." \
> +			"Serial port enumeration may be unpredictable.\n");

1) You removed a space after the dot
2) the backslash is superfluous
3) CodingStyle clearly states:
"""
However, never break user-visible strings such as
printk messages, because that breaks the ability to grep for them.
"""

So, sorry:
Nacked-by: Jiri Slaby <jslaby@suse.cz>

>  
>  	return ret;
>  }
> 


-- 
js
suse labs

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

* Re:Re: [PATCH] serial: pl011: format long message string into lines
  2020-03-13  7:03 ` Jiri Slaby
@ 2020-03-13  7:30   ` 王文虎
  0 siblings, 0 replies; 3+ messages in thread
From: 王文虎 @ 2020-03-13  7:30 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: Russell King, Greg Kroah-Hartman, linux-serial, linux-kernel, trivial

From: Jiri Slaby <jslaby@suse.cz>
Date: 2020-03-13 15:03:05
To:  WANG Wenhu <wenhu.wang@vivo.com>,Russell King <linux@armlinux.org.uk>,Greg Kroah-Hartman <gregkh@linuxfoundation.org>,linux-serial@vger.kernel.org,linux-kernel@vger.kernel.org
Cc:  trivial@kernel.org
Subject: Re: [PATCH] serial: pl011: format long message string into lines>On 13. 03. 20, 7:56, WANG Wenhu wrote:
>> Separate the message string into lines for pl011_probe_dt_alias()
>> to make it better comply with kernel coding style, and also, make
>> it more readable.
>> 
>> It would still be grep friendly for the separated format.
>> 
>> Signed-off-by: WANG Wenhu <wenhu.wang@vivo.com>
>> ---
>>  drivers/tty/serial/amba-pl011.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>> 
>> diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
>> index 2296bb0f9578..e693b7ac5a3a 100644
>> --- a/drivers/tty/serial/amba-pl011.c
>> +++ b/drivers/tty/serial/amba-pl011.c
>> @@ -2523,7 +2523,8 @@ static int pl011_probe_dt_alias(int index, struct device *dev)
>>  	}
>>  
>>  	if (seen_dev_with_alias && seen_dev_without_alias)
>> -		dev_warn(dev, "aliased and non-aliased serial devices found in device tree. Serial port enumeration may be unpredictable.\n");
>> +		dev_warn(dev, "aliased and non-aliased serial devices found in device tree." \
>> +			"Serial port enumeration may be unpredictable.\n");
>
>1) You removed a space after the dot
>2) the backslash is superfluous
>3) CodingStyle clearly states:
>"""
>However, never break user-visible strings such as
>printk messages, because that breaks the ability to grep for them.
>"""
>
>So, sorry:
>Nacked-by: Jiri Slaby <jslaby@suse.cz>
>
Surely, sorry for my fault. Out to reference coding style once more in detail. 
Thanks.
>>  
>>  	return ret;
>>  }
>> 
>
>
>-- 
>js
>suse labs

Wenhu


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

end of thread, other threads:[~2020-03-13  7:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-13  6:56 [PATCH] serial: pl011: format long message string into lines WANG Wenhu
2020-03-13  7:03 ` Jiri Slaby
2020-03-13  7:30   ` 王文虎

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