mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Jaya Durga <jayad@cdac.in>, gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, florian.c.schilhabel@googlemail.com,
	driverdev-devel@linuxdriverproject.org,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4] Staging: rtl8712: ieee80211: fixed camelcase coding style
Date: Mon, 08 May 2017 14:45:51 -0700	[thread overview]
Message-ID: <1494279951.31950.70.camel@perches.com> (raw)
In-Reply-To: <1494271990-32706-1-git-send-email-jayad@cdac.in>

On Tue, 2017-05-09 at 01:03 +0530, Jaya Durga wrote:
> Fixed coding style issue

Do please strive to do more than shut up checkpatch
messages.  It's _far_ more important to use sensible
coding mechanisms and reuse existing code utilities.

> diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
[]
> @@ -150,12 +150,12 @@ static noinline_for_stack char *translate_scan(struct _adapter *padapter,
>  	u16	cap, ht_cap = false, mcs_rate;
>  	u8 rssi;
>  
> -	if ((pnetwork->network.Configuration.DSConfig < 1) ||
> -	    (pnetwork->network.Configuration.DSConfig > 14)) {
> -		if (pnetwork->network.Configuration.DSConfig < 1)
> -			pnetwork->network.Configuration.DSConfig = 1;
> +	if ((pnetwork->network.configuration.ds_config < 1) ||
> +	    (pnetwork->network.configuration.ds_config > 14)) {
> +		if (pnetwork->network.configuration.ds_config < 1)
> +			pnetwork->network.configuration.ds_config = 1;
>  		else
> -			pnetwork->network.Configuration.DSConfig = 14;
> +			pnetwork->network.configuration.ds_config = 14;
>  	}

For instance: this could be rewritten in a single line.

In a different patch, assuming you add a temporary for
&pnetwork->network.configuration, these 7 lines could be:

	cfg->ds_config = clamp(cfg->ds_config, 1, 14);

      reply	other threads:[~2017-05-09 15:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-08 19:33 Jaya Durga
2017-05-08 21:45 ` Joe Perches [this message]

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=1494279951.31950.70.camel@perches.com \
    --to=joe@perches.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=florian.c.schilhabel@googlemail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jayad@cdac.in \
    --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

Powered by JetHome