All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi@samsung.com>
To: Joe Perches <joe@perches.com>,
	myungjoo.ham@samsung.com,
	Kyungmin Park <kyungmin.park@samsung.com>
Cc: "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/4] rk3399_dmc: Fix line continuation format
Date: Thu, 23 Nov 2017 11:23:21 +0900	[thread overview]
Message-ID: <5A163119.1050500@samsung.com> (raw)
In-Reply-To: <1511403518.2385.8.camel@perches.com>

On 2017년 11월 23일 11:18, Joe Perches wrote:
> On Thu, 2017-11-23 at 11:12 +0900, Chanwoo Choi wrote:
>> On 2017년 11월 23일 11:07, Joe Perches wrote:
>>> On Thu, 2017-11-23 at 10:45 +0900, Chanwoo Choi wrote:
>>>> On 2017년 11월 23일 10:21, MyungJoo Ham wrote:
>>>>>> On Wed, 2017-11-22 at 14:13 +0900, Chanwoo Choi wrote:
>>>>>>> On 2017년 11월 17일 00:27, Joe Perches wrote:
>>>>>>>> Line continuations with excess spacing causes unexpected output.
>>>>>>>>
>>>>>>>> Signed-off-by: Joe Perches <joe@perches.com>
>>>>>>>> ---
>>>>>>>>  drivers/devfreq/rk3399_dmc.c | 4 ++--
>>>>>>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>>>>>>
>>>>>>>> diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c
>>>>>>>> index 5dfbfa3cc878..0938c97d46f0 100644
>>>>>>>> --- a/drivers/devfreq/rk3399_dmc.c
>>>>>>>> +++ b/drivers/devfreq/rk3399_dmc.c
>>>>>>>> @@ -146,8 +146,8 @@ static int rk3399_dmcfreq_target(struct device *dev, unsigned long *freq,
>>>>>>>>  
>>>>>>>>  	/* If get the incorrect rate, set voltage to old value. */
>>>>>>>>  	if (dmcfreq->rate != target_rate) {
>>>>>>>> -		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu,\
>>>>>>>> -			Current frequency %lu\n", target_rate, dmcfreq->rate);
>>>>>>>> +		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu, Current frequency %lu\n",
>>>>>>>> +			target_rate, dmcfreq->rate);
>>>>>>>
>>>>>>> IMO, I don't like over 80 char in the one line.
>>>>>>
>>>>>> Fix it as you chose, but the code I proposed
>>>>>> is what is preferred by CodingStyle.
>>>>>>
>>>>>> The current code is unintentional.
>>>>>>
>>>>>> Right now there are 3 tabs between "Request frequency"
>>>>>> and "Current frequency" in the output.
>>>>>
>>>>> Chanwoo, this is not a simple coding style issue.
>>>>> I'm seeing these unintentional tabs as well.
>>>>>
>>>>>
>>>>> If you want to keep it 80 cols with strings (which is r mandatory for strings in double quotes),
>>>>> We'd better do:
>>>>>
>>>>> -		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu,\
>>>>> -			Current frequency %lu\n", target_rate, dmcfreq->rate);
>>>>> +		dev_err(dev, "Get wrong ddr frequency, Request frequency %lu,"
>>>>> +			" Current frequency %lu\n", target_rate, dmcfreq->rate);
>>>>
>>>> I agree with Myungjoo's opinion.
>>>> I think the readability is important. So, I prefer to keep one line within 80 char.
>>>
>>> Read Documentation/process/coding-style.rst
>>>
>>> What I proposed is by far the common style.
>>> I think you should get used to it.
>>
>> Read line.81 in the Documentation/process/coding-style.rst
>> - "2) Breaking long lines and strings"
>>
>> Or, we better to modify the error message within 80 char.
> 
> Exactly!
> 
> line 94:
> 
> never break user-visible strings such as
> printk messages, because that breaks the ability to grep for them

So, I suggested "Or, we better to modify the error message within 80 char.".

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

  reply	other threads:[~2017-11-23  2:23 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-16 15:27 [PATCH 0/4] treewide: Fix line continuation formats Joe Perches
2017-11-16 15:27 ` Joe Perches
2017-11-16 15:27 ` Joe Perches
2017-11-16 15:27 ` [PATCH 1/4] rk3399_dmc: Fix line continuation format Joe Perches
2017-11-22  5:13   ` Chanwoo Choi
2017-11-22 10:41     ` Joe Perches
2017-11-23  1:21       ` MyungJoo Ham
2017-11-23  1:21         ` MyungJoo Ham
2017-11-23  1:45         ` Chanwoo Choi
2017-11-23  2:07           ` Joe Perches
2017-11-23  2:12             ` Chanwoo Choi
2017-11-23  2:18               ` Joe Perches
2017-11-23  2:23                 ` Chanwoo Choi [this message]
2017-11-23  2:29                   ` Joe Perches
2017-11-23  2:35                     ` Chanwoo Choi
2017-11-23  2:38                       ` Joe Perches
2017-11-16 15:27 ` [PATCH 2/4] drm: amd: Fix line continuation formats Joe Perches
2017-11-16 15:27   ` Joe Perches
     [not found]   ` <eee8836696843f983a9533d6441fa9f2d8cbe92f.1510845910.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2017-11-16 15:38     ` Harry Wentland
2017-11-16 15:38       ` Harry Wentland
2017-11-16 15:50       ` Joe Perches
2017-11-16 15:50         ` Joe Perches
     [not found]         ` <1510847412.31559.25.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2017-11-17 19:52           ` Alex Deucher
2017-11-17 19:52             ` Alex Deucher
2017-11-16 15:27 ` [PATCH 3/4] [media] dibx000_common: Fix line continuation format Joe Perches
2017-11-16 15:27 ` [PATCH 4/4] ima: " Joe Perches
2017-11-16 15:27   ` Joe Perches
2017-11-16 17:11 ` [PATCH 0/4] treewide: Fix line continuation formats Mimi Zohar
2017-11-16 17:11   ` Mimi Zohar
2017-11-16 17:11   ` Mimi Zohar
2017-11-16 17:17   ` Joe Perches
2017-11-16 17:17     ` Joe Perches
2017-11-16 19:35     ` Mimi Zohar
2017-11-16 19:35       ` Mimi Zohar

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=5A163119.1050500@samsung.com \
    --to=cw00.choi@samsung.com \
    --cc=joe@perches.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=myungjoo.ham@samsung.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.