From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752145AbdKWCSn (ORCPT ); Wed, 22 Nov 2017 21:18:43 -0500 Received: from smtprelay0098.hostedemail.com ([216.40.44.98]:34627 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751860AbdKWCSm (ORCPT ); Wed, 22 Nov 2017 21:18:42 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:152:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1543:1593:1594:1605:1711:1730:1747:1777:1792:2393:2559:2562:3138:3139:3140:3141:3142:3622:3865:3867:3868:3870:3871:3872:3873:3874:4321:4823:5007:6119:7903:7904:8957:9040:10004:10400:10848:11232:11658:11914:12043:12438:12555:12663:12740:12895:13095:13894:14181:14659:14721:21080:21433:21627:30012:30054:30056:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: game75_4bac36c67ef5c X-Filterd-Recvd-Size: 4262 Message-ID: <1511403518.2385.8.camel@perches.com> Subject: Re: [PATCH 1/4] rk3399_dmc: Fix line continuation format From: Joe Perches To: Chanwoo Choi , myungjoo.ham@samsung.com, Kyungmin Park Cc: "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Date: Wed, 22 Nov 2017 18:18:38 -0800 In-Reply-To: <5A162E8A.3040207@samsung.com> References: <1511347280.6989.81.camel@perches.com> <7d659960e45f66894126fba9e2d54cf25ae1185b.1510845910.git.joe@perches.com> <5A150792.6050104@samsung.com> <20171123012100epcms1p13f78950557de06dbbd65996c8b0645ee@epcms1p1> <5A162835.5050806@samsung.com> <1511402826.2385.3.camel@perches.com> <5A162E8A.3040207@samsung.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.1-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: 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 > > > > > > > --- > > > > > > > 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