[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1494279951.31950.70.camel@perches.com>
Date: Mon, 08 May 2017 14:45:51 -0700
From: Joe Perches <joe@...ches.com>
To: Jaya Durga <jayad@...c.in>, gregkh@...uxfoundation.org
Cc: Larry.Finger@...inger.net, florian.c.schilhabel@...glemail.com,
driverdev-devel@...uxdriverproject.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] Staging: rtl8712: ieee80211: fixed camelcase
coding style
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);
Powered by blists - more mailing lists