From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753907AbdEIPMl (ORCPT ); Tue, 9 May 2017 11:12:41 -0400 Received: from smtprelay0112.hostedemail.com ([216.40.44.112]:35540 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752049AbdEIPMa (ORCPT ); Tue, 9 May 2017 11:12:30 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::,RULES_HIT:41:355:379:541:599:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:2914:3138:3139:3140:3141:3142:3352:3622:3867:3868:3870:3872:3873:4321:5007:6691:10004:10400:10848:11026:11232:11658:11914:12043:12679:12740:12895:13069:13181:13229:13311:13357:13439:13894:14659:14721:21080:21433:21434:21451:21627:30012:30054: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: tent81_6c93131f39530 X-Filterd-Recvd-Size: 2250 Message-ID: <1494279951.31950.70.camel@perches.com> Subject: Re: [PATCH 3/4] Staging: rtl8712: ieee80211: fixed camelcase coding style From: Joe Perches To: Jaya Durga , 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 In-Reply-To: <1494271990-32706-1-git-send-email-jayad@cdac.in> References: <1494271990-32706-1-git-send-email-jayad@cdac.in> Content-Type: text/plain; charset="ISO-8859-1" Date: Mon, 08 May 2017 14:45:51 -0700 Mime-Version: 1.0 X-Mailer: Evolution 3.22.6-1ubuntu1 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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);