From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1947372AbdD1QqN (ORCPT ); Fri, 28 Apr 2017 12:46:13 -0400 Received: from smtprelay0065.hostedemail.com ([216.40.44.65]:41400 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1426358AbdD1Qp5 (ORCPT ); Fri, 28 Apr 2017 12:45:57 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:541:599:800:960:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1535:1544:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2828:2902:3138:3139:3140:3141:3142:3354:3622:3865:3866:3867:3868:3870:3871:3872:3873:4250:4321:5007:7875:8660:10004:10848:11026:11232:11658:11783:11914:12043:12555:12702:12737:12740:12895:13148:13230:13439:13894:14181:14659:14721:21080:30012:30054:30090: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: peace49_8a441eba0820c X-Filterd-Recvd-Size: 5008 Message-ID: <1493397948.1873.1.camel@perches.com> Subject: Re: [PATCH] staging: ks7010: remove line continuations in quoted strings From: Joe Perches To: Dan Carpenter , Ilia Sergachev Cc: Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Date: Fri, 28 Apr 2017 09:45:48 -0700 In-Reply-To: <20170428142617.wdqlotp7ehzbe4ag@mwanda> References: <20170428141928.31893-1-ilia.sergachev@unibas.ch> <20170428142617.wdqlotp7ehzbe4ag@mwanda> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 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 Fri, 2017-04-28 at 17:26 +0300, Dan Carpenter wrote: > On Fri, Apr 28, 2017 at 04:19:28PM +0200, Ilia Sergachev wrote: > > Checkpatch emits WARNING: Avoid line continuations in quoted strings. > > > > Remove line continuations - split strings using quotes. > > > > Signed-off-by: Ilia Sergachev > > --- > > drivers/staging/ks7010/ks_hostif.c | 20 ++++++++++++++------ > > 1 file changed, 14 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c > > index 7151f16e2f9c..a0c632a52f48 100644 > > --- a/drivers/staging/ks7010/ks_hostif.c > > +++ b/drivers/staging/ks7010/ks_hostif.c > > @@ -191,9 +191,15 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info) > > wireless_send_event(netdev, SIOCGIWAP, &wrqu, NULL); > > } > > DPRINTK(4, "\n Link AP\n"); > > - DPRINTK(4, " bssid=%02X:%02X:%02X:%02X:%02X:%02X\n \ > > - essid=%s\n rate_set=%02X,%02X,%02X,%02X,%02X,%02X,%02X,%02X\n channel=%d\n \ > > - rssi=%d\n sq=%d\n capability=%04X\n", ap->bssid[0], ap->bssid[1], ap->bssid[2], ap->bssid[3], ap->bssid[4], ap->bssid[5], &(ap->ssid.body[0]), ap->rate_set.body[0], ap->rate_set.body[1], ap->rate_set.body[2], ap->rate_set.body[3], ap->rate_set.body[4], ap->rate_set.body[5], ap->rate_set.body[6], ap->rate_set.body[7], ap->channel, ap->rssi, ap->sq, ap->capability); > > + DPRINTK(4, " bssid=%02X:%02X:%02X:%02X:%02bX:%02X\n" > > + " essid=%s\n rate_set=%02X,%02X,%02X,%02X,%02X,%02X,%02X,%02X\n" > > + " channel=%d\n rssi=%d\n sq=%d\n capability=%04X\n", > > + ap->bssid[0], ap->bssid[1], ap->bssid[2], > > + ap->bssid[3], ap->bssid[4], ap->bssid[5], > > + &(ap->ssid.body[0]), ap->rate_set.body[0], ap->rate_set.body[1], > > + ap->rate_set.body[2], ap->rate_set.body[3], ap->rate_set.body[4], > > + ap->rate_set.body[5], ap->rate_set.body[6], ap->rate_set.body[7], > > + ap->channel, ap->rssi, ap->sq, ap->capability); > > Could you indent it like this: > > DPRINTK(4, " bssid=%02X:%02X:%02X:%02X:%02X:%02X\n" > " essid=%s\n rate_set=%02X,%02X,%02X,%02X,%02X,%02X,%02X,%02X\n" > " channel=%d\n rssi=%d\n sq=%d\n capability=%04X\n", > ap->bssid[0], ap->bssid[1], ap->bssid[2], > ap->bssid[3], ap->bssid[4], ap->bssid[5], > &(ap->ssid.body[0]), ap->rate_set.body[0], ap->rate_set.body[1], > ap->rate_set.body[2], ap->rate_set.body[3], ap->rate_set.body[4], > ap->rate_set.body[5], ap->rate_set.body[6], ap->rate_set.body[7], > ap->channel, ap->rssi, ap->sq, ap->capability); > > And actually it might be more readable to break it up more: > > DPRINTK(4, " bssid=%02X:%02X:%02X:%02X:%02X:%02X\n" > " essid=%s\n" > " rate_set=%02X,%02X,%02X,%02X,%02X,%02X,%02X,%02X\n" > " channel=%d\n" > " rssi=%d\n" > " sq=%d\n" > " capability=%04X\n", > ap->bssid[0], ap->bssid[1], ap->bssid[2], > ap->bssid[3], ap->bssid[4], ap->bssid[5], > &(ap->ssid.body[0]), ap->rate_set.body[0], ap->rate_set.body[1], > ap->rate_set.body[2], ap->rate_set.body[3], ap->rate_set.body[4], > ap->rate_set.body[5], ap->rate_set.body[6], ap->rate_set.body[7], > ap->channel, ap->rssi, ap->sq, ap->capability); And it might be smaller object code for some arches to use one DPRINTK call for each line. Probably more readable in the logs too with each line timestamped instead of just the first line. (and use %pM assuming bssid is char) DPRINTK(4, " bssid=%pM\n", ap->bssid); DPRINTK(4, " essud=%s\n", ap->ssid.body); DPRINTK(4, "    rate_set=%02X,%02X,%02X,%02X,%02X,%02X,%02X,%02X\n", ap->rate_set.body[0], ap->rate_set.body[1], ap->rate_set.body[2], ap->rate_set.body[3], ap->rate_set.body[4], ap->rate_set.body[5], ap->rate_set.body[6], ap->rate_set.body[7]); DPRINTK(4, " channel=%d\n", ap->channel); DPRINTK(4, " rssi=%d\n", ap->rssi); DPRINTK(4, " sq=%d\n", ap->sq); DPRINTK(4, " capability=%04X\n", ap->capability);