lkml.org 
[lkml]   [2017]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Staging: ks7010: style fix, long lines

On Thu, Jan 05, 2017 at 12:56:16PM +1300, Derek Robson wrote:
> Debug code had very long lines.
> Reworked code to use several prints rather than one big print.
>
> Signed-off-by: Derek Robson <robsonde@gmail.com>
> ---
> drivers/staging/ks7010/ks_hostif.c | 32 +++++++++++++++++++++++++-------
> 1 file changed, 25 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
> index 1fbd495e5e63..70f8565acbeb 100644
> --- a/drivers/staging/ks7010/ks_hostif.c
> +++ b/drivers/staging/ks7010/ks_hostif.c
> @@ -190,13 +190,31 @@ 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, "\n Link AP\n rsn.mode=%d\n rsn.size=%d\n",
> - ap_info->rsn_mode, ap_info->rsn.size);
> - DPRINTK(4, "\n ext_rate_set_size=%d\n rate_set_size=%d\n",
> - ap_info->ext_rate_set.size, ap_info->rate_set.size);
> + DPRINTK(4, " bssid=");
> + DPRINTK(4, "%02X:", ap->bssid[0]);

No. You can't do this. Every DPRINTK() prints the function name and
some other stuff so it would totally mess up the output.

regards,
dan carpenter

\
 
 \ /
  Last update: 2017-01-05 18:04    [W:0.161 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site