public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Tobin C. Harding" <me@tobin.cc>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Ilia Sergachev <ilia.sergachev@unibas.ch>,
	devel@driverdev.osuosl.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: ks7010: remove line continuations in quoted strings
Date: Sun, 30 Apr 2017 19:05:10 +1000	[thread overview]
Message-ID: <20170430090510.GC14735@eros> (raw)
In-Reply-To: <20170428142617.wdqlotp7ehzbe4ag@mwanda>

On Fri, Apr 28, 2017 at 05:26:17PM +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 <ilia.sergachev@unibas.ch>
> > ---
> >  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:%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);
> 
> 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);
> 
> Except that's not really how newlines are supposed to work in dmesg...
> Whatever.

This driver is full of these DPRINTK's, I would like to see them gone
once some more testing is done. I don't see any nice way to keep them
without upsetting checkpatch. It may not be worth bothering with them
for now.

thanks,
Tobin.

  parent reply	other threads:[~2017-04-30  9:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-28 14:19 [PATCH] staging: ks7010: remove line continuations in quoted strings Ilia Sergachev
2017-04-28 14:26 ` Dan Carpenter
2017-04-28 16:45   ` Joe Perches
2017-04-30  9:05   ` Tobin C. Harding [this message]
2017-04-28 15:30 ` [PATCH v2] " Ilia Sergachev

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=20170430090510.GC14735@eros \
    --to=me@tobin.cc \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=ilia.sergachev@unibas.ch \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox