* [PATCH 0/4] treewide: Fix line continuation formats
@ 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-16 17:11 ` [PATCH 0/4] treewide: Fix line continuation formats Mimi Zohar
0 siblings, 2 replies; 16+ messages in thread
From: Joe Perches @ 2017-11-16 15:27 UTC (permalink / raw)
To: Chanwoo Choi, linux-pm, linux-integrity
Cc: linux-security-module, dri-devel, linux-kernel, amd-gfx,
linux-media
Avoid using line continations in formats as that causes unexpected
output.
Joe Perches (4):
rk3399_dmc: Fix line continuation format
drm: amd: Fix line continuation formats
[media] dibx000_common: Fix line continuation format
ima: Fix line continuation format
drivers/devfreq/rk3399_dmc.c | 4 ++--
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 11 ++++-----
.../amd/powerplay/hwmgr/process_pptables_v1_0.c | 6 ++---
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 27 ++++++++--------------
drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 6 ++---
.../gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 9 +++-----
.../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 6 ++---
drivers/media/dvb-frontends/dibx000_common.c | 8 +++----
security/integrity/ima/ima_template.c | 11 ++++-----
9 files changed, 33 insertions(+), 55 deletions(-)
--
2.15.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/4] rk3399_dmc: Fix line continuation format
2017-11-16 15:27 [PATCH 0/4] treewide: Fix line continuation formats Joe Perches
@ 2017-11-16 15:27 ` Joe Perches
2017-11-22 5:13 ` Chanwoo Choi
2017-11-16 17:11 ` [PATCH 0/4] treewide: Fix line continuation formats Mimi Zohar
1 sibling, 1 reply; 16+ messages in thread
From: Joe Perches @ 2017-11-16 15:27 UTC (permalink / raw)
To: MyungJoo Ham, Kyungmin Park, Chanwoo Choi; +Cc: linux-pm, linux-kernel
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);
regulator_set_voltage(dmcfreq->vdd_center, dmcfreq->volt,
dmcfreq->volt);
goto out;
--
2.15.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 0/4] treewide: Fix line continuation formats
2017-11-16 15:27 [PATCH 0/4] treewide: Fix line continuation formats Joe Perches
2017-11-16 15:27 ` [PATCH 1/4] rk3399_dmc: Fix line continuation format Joe Perches
@ 2017-11-16 17:11 ` Mimi Zohar
2017-11-16 17:17 ` Joe Perches
1 sibling, 1 reply; 16+ messages in thread
From: Mimi Zohar @ 2017-11-16 17:11 UTC (permalink / raw)
To: Joe Perches, Chanwoo Choi, linux-pm, linux-integrity
Cc: linux-kernel, amd-gfx, dri-devel, linux-media,
linux-security-module
On Thu, 2017-11-16 at 07:27 -0800, Joe Perches wrote:
> Avoid using line continations in formats as that causes unexpected
> output.
Is having lines greater than 80 characters the preferred method?
Could you add quotes before the backlash and before the first word on
the next line instead?
Mimi
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/4] treewide: Fix line continuation formats
2017-11-16 17:11 ` [PATCH 0/4] treewide: Fix line continuation formats Mimi Zohar
@ 2017-11-16 17:17 ` Joe Perches
2017-11-16 19:35 ` Mimi Zohar
0 siblings, 1 reply; 16+ messages in thread
From: Joe Perches @ 2017-11-16 17:17 UTC (permalink / raw)
To: Mimi Zohar, Chanwoo Choi, linux-pm, linux-integrity
Cc: linux-kernel, amd-gfx, dri-devel, linux-media,
linux-security-module
On Thu, 2017-11-16 at 12:11 -0500, Mimi Zohar wrote:
> On Thu, 2017-11-16 at 07:27 -0800, Joe Perches wrote:
> > Avoid using line continations in formats as that causes unexpected
> > output.
>
> Is having lines greater than 80 characters the preferred method?
yes.
> Could you add quotes before the backlash and before the first word on
> the next line instead?
coalesced formats are preferred.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/4] treewide: Fix line continuation formats
2017-11-16 17:17 ` Joe Perches
@ 2017-11-16 19:35 ` Mimi Zohar
0 siblings, 0 replies; 16+ messages in thread
From: Mimi Zohar @ 2017-11-16 19:35 UTC (permalink / raw)
To: Joe Perches, Chanwoo Choi, linux-pm, linux-integrity
Cc: linux-kernel, amd-gfx, dri-devel, linux-media,
linux-security-module
On Thu, 2017-11-16 at 09:17 -0800, Joe Perches wrote:
> On Thu, 2017-11-16 at 12:11 -0500, Mimi Zohar wrote:
> > On Thu, 2017-11-16 at 07:27 -0800, Joe Perches wrote:
> > > Avoid using line continations in formats as that causes unexpected
> > > output.
> >
> > Is having lines greater than 80 characters the preferred method?
>
> yes.
>
> > Could you add quotes before the backlash and before the first word on
> > the next line instead?
>
> coalesced formats are preferred.
In the future, please reference the commit 6f76b6fcaa60 "CodingStyle:
Document the exception of not splitting user-visible strings, for
grepping"
thanks,
Mimi
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/4] rk3399_dmc: Fix line continuation format
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
[not found] ` <CGME20171116152742epcas2p22b17887a4d7f2adcd3beb414988dbce3@epcms1p1>
0 siblings, 2 replies; 16+ messages in thread
From: Chanwoo Choi @ 2017-11-22 5:13 UTC (permalink / raw)
To: Joe Perches, MyungJoo Ham, Kyungmin Park; +Cc: linux-pm, linux-kernel
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.
> regulator_set_voltage(dmcfreq->vdd_center, dmcfreq->volt,
> dmcfreq->volt);
> goto out;
>
--
Best Regards,
Chanwoo Choi
Samsung Electronics
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/4] rk3399_dmc: Fix line continuation format
2017-11-22 5:13 ` Chanwoo Choi
@ 2017-11-22 10:41 ` Joe Perches
[not found] ` <CGME20171116152742epcas2p22b17887a4d7f2adcd3beb414988dbce3@epcms1p1>
1 sibling, 0 replies; 16+ messages in thread
From: Joe Perches @ 2017-11-22 10:41 UTC (permalink / raw)
To: Chanwoo Choi, MyungJoo Ham, Kyungmin Park; +Cc: linux-pm, linux-kernel
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.
> > regulator_set_voltage(dmcfreq->vdd_center, dmcfreq->volt,
> > dmcfreq->volt);
> > goto out;
> >
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: Re: [PATCH 1/4] rk3399_dmc: Fix line continuation format
[not found] ` <CGME20171116152742epcas2p22b17887a4d7f2adcd3beb414988dbce3@epcms1p1>
@ 2017-11-23 1:21 ` MyungJoo Ham
2017-11-23 1:45 ` Chanwoo Choi
0 siblings, 1 reply; 16+ messages in thread
From: MyungJoo Ham @ 2017-11-23 1:21 UTC (permalink / raw)
To: Joe Perches, Chanwoo Choi, Kyungmin Park
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
> 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 not 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);
Cheers,
MyungJoo
>
> > > regulator_set_voltage(dmcfreq->vdd_center, dmcfreq->volt,
> > > dmcfreq->volt);
> > > goto out;
> > >
> >
> >
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/4] rk3399_dmc: Fix line continuation format
2017-11-23 1:21 ` MyungJoo Ham
@ 2017-11-23 1:45 ` Chanwoo Choi
2017-11-23 2:07 ` Joe Perches
0 siblings, 1 reply; 16+ messages in thread
From: Chanwoo Choi @ 2017-11-23 1:45 UTC (permalink / raw)
To: myungjoo.ham, Joe Perches, Kyungmin Park
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
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 not 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.
>
> Cheers,
> MyungJoo
>
>>
>>>> regulator_set_voltage(dmcfreq->vdd_center, dmcfreq->volt,
>>>> dmcfreq->volt);
>>>> goto out;
>>>>
>>>
>>>
>>
>
>
>
--
Best Regards,
Chanwoo Choi
Samsung Electronics
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/4] rk3399_dmc: Fix line continuation format
2017-11-23 1:45 ` Chanwoo Choi
@ 2017-11-23 2:07 ` Joe Perches
2017-11-23 2:12 ` Chanwoo Choi
0 siblings, 1 reply; 16+ messages in thread
From: Joe Perches @ 2017-11-23 2:07 UTC (permalink / raw)
To: Chanwoo Choi, myungjoo.ham, Kyungmin Park
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
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.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/4] rk3399_dmc: Fix line continuation format
2017-11-23 2:07 ` Joe Perches
@ 2017-11-23 2:12 ` Chanwoo Choi
2017-11-23 2:18 ` Joe Perches
0 siblings, 1 reply; 16+ messages in thread
From: Chanwoo Choi @ 2017-11-23 2:12 UTC (permalink / raw)
To: Joe Perches, myungjoo.ham, Kyungmin Park
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
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.
--
Best Regards,
Chanwoo Choi
Samsung Electronics
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/4] rk3399_dmc: Fix line continuation format
2017-11-23 2:12 ` Chanwoo Choi
@ 2017-11-23 2:18 ` Joe Perches
2017-11-23 2:23 ` Chanwoo Choi
0 siblings, 1 reply; 16+ messages in thread
From: Joe Perches @ 2017-11-23 2:18 UTC (permalink / raw)
To: Chanwoo Choi, myungjoo.ham, Kyungmin Park
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/4] rk3399_dmc: Fix line continuation format
2017-11-23 2:18 ` Joe Perches
@ 2017-11-23 2:23 ` Chanwoo Choi
2017-11-23 2:29 ` Joe Perches
0 siblings, 1 reply; 16+ messages in thread
From: Chanwoo Choi @ 2017-11-23 2:23 UTC (permalink / raw)
To: Joe Perches, myungjoo.ham, Kyungmin Park
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/4] rk3399_dmc: Fix line continuation format
2017-11-23 2:23 ` Chanwoo Choi
@ 2017-11-23 2:29 ` Joe Perches
2017-11-23 2:35 ` Chanwoo Choi
0 siblings, 1 reply; 16+ messages in thread
From: Joe Perches @ 2017-11-23 2:29 UTC (permalink / raw)
To: Chanwoo Choi, myungjoo.ham, Kyungmin Park
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
On Thu, 2017-11-23 at 11:23 +0900, Chanwoo Choi wrote:
> On 2017년 11월 23일 11:18, Joe Perches wrote:
> > 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.".
Run checkpatch on your suggestion.
You will get a "split_string" warning.
cheers, Joe
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/4] rk3399_dmc: Fix line continuation format
2017-11-23 2:29 ` Joe Perches
@ 2017-11-23 2:35 ` Chanwoo Choi
2017-11-23 2:38 ` Joe Perches
0 siblings, 1 reply; 16+ messages in thread
From: Chanwoo Choi @ 2017-11-23 2:35 UTC (permalink / raw)
To: Joe Perches, myungjoo.ham, Kyungmin Park
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
On 2017년 11월 23일 11:29, Joe Perches wrote:
> On Thu, 2017-11-23 at 11:23 +0900, Chanwoo Choi wrote:
>> On 2017년 11월 23일 11:18, Joe Perches wrote:
>>> 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.".
>
> Run checkpatch on your suggestion.
> You will get a "split_string" warning.
I knew about this. I don't like to hurt the readability
in order to fix the warning with the improper way.
If you want to fix it, I suggested that you better to modify
the error message within 80 char. Or I prefer the Myungjoo's opinion.
--
Best Regards,
Chanwoo Choi
Samsung Electronics
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/4] rk3399_dmc: Fix line continuation format
2017-11-23 2:35 ` Chanwoo Choi
@ 2017-11-23 2:38 ` Joe Perches
0 siblings, 0 replies; 16+ messages in thread
From: Joe Perches @ 2017-11-23 2:38 UTC (permalink / raw)
To: Chanwoo Choi, myungjoo.ham, Kyungmin Park
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
On Thu, 2017-11-23 at 11:35 +0900, Chanwoo Choi wrote:
> On 2017년 11월 23일 11:29, Joe Perches wrote:
> > On Thu, 2017-11-23 at 11:23 +0900, Chanwoo Choi wrote:
> > > On 2017년 11월 23일 11:18, Joe Perches wrote:
> > > > 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.".
> >
> > Run checkpatch on your suggestion.
> > You will get a "split_string" warning.
>
> I knew about this. I don't like to hurt the readability
> in order to fix the warning with the improper way.
>
> If you want to fix it, I suggested that you better to modify
> the error message within 80 char. Or I prefer the Myungjoo's opinion.
Again, I don't really care how it's fixed,
but the 3 tabs in the middle of the message
are stupid.
Please fix it.
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2017-11-23 2:38 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-16 15:27 [PATCH 0/4] treewide: Fix line continuation formats 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
[not found] ` <CGME20171116152742epcas2p22b17887a4d7f2adcd3beb414988dbce3@epcms1p1>
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
2017-11-23 2:29 ` Joe Perches
2017-11-23 2:35 ` Chanwoo Choi
2017-11-23 2:38 ` Joe Perches
2017-11-16 17:11 ` [PATCH 0/4] treewide: Fix line continuation formats Mimi Zohar
2017-11-16 17:17 ` Joe Perches
2017-11-16 19:35 ` Mimi Zohar
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).