lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1511403518.2385.8.camel@perches.com>
Date:   Wed, 22 Nov 2017 18:18:38 -0800
From:   Joe Perches <joe@...ches.com>
To:     Chanwoo Choi <cw00.choi@...sung.com>, myungjoo.ham@...sung.com,
        Kyungmin Park <kyungmin.park@...sung.com>
Cc:     "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/4] rk3399_dmc: Fix line continuation format

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@...ches.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ