Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751621AbdIUKYE (ORCPT ); Thu, 21 Sep 2017 06:24:04 -0400 Received: from smtprelay0134.hostedemail.com ([216.40.44.134]:35813 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751283AbdIUKYD (ORCPT ); Thu, 21 Sep 2017 06:24:03 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::,RULES_HIT:41:355:379:541:599:968: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:2553:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3868:3871:3872:3873:3874:4277:4321:5007:10004:10400:10848:11026:11232:11657:11658:11914:12043:12485:12740:12760:12895:13069:13311:13357:13439:14181:14659:14721:14879:21080:21451:21627:30012:30054:30070:30090: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: crowd60_403de636ca135 X-Filterd-Recvd-Size: 2077 Message-ID: <1505989440.12311.22.camel@perches.com> Subject: Re: [PATCH] staging:rtl8188eu Remove unnecessary {} braces in From: Joe Perches To: Dan Carpenter , Janani Sankara Babu Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, insafonov@gmail.com, mihaela.muraru21@gmail.com, goudapatilk@gmail.com, linux-kernel@vger.kernel.org, palaviv@gmail.com Date: Thu, 21 Sep 2017 03:24:00 -0700 In-Reply-To: <20170921071536.visdfmkuvg2pv7sz@mwanda> References: <1505976484-28616-1-git-send-email-jananis37@gmail.com> <20170921071536.visdfmkuvg2pv7sz@mwanda> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1062 Lines: 42 On Thu, 2017-09-21 at 10:15 +0300, Dan Carpenter wrote: > On Thu, Sep 21, 2017 at 12:18:04PM +0530, Janani Sankara Babu wrote: > > --- a/drivers/staging/rtl8188eu/hal/phy.c > > +++ b/drivers/staging/rtl8188eu/hal/phy.c > > @@ -728,9 +728,9 @@ static void patha_fill_iqk(struct adapter *adapt, bool iqkok, s32 result[][8], > > u32 oldval_0, x, tx0_a, reg; > > s32 y, tx0_c; > > > > - if (final_candidate == 0xFF) { > > + if (final_candidate == 0xFF) > > return; > > - } else if (iqkok) { > > + else if (iqkok) { > > No. These ones stay. Your change would introduce a new checkpatch.pl > warning if you ran it against the patched file. The rule here is that > if one side of the if else has curly braces then both sides get them. And the else could be removed if (final_candidate == 0xff) return; if (iqkok) { [etc...] and the code should probably be if (final_candidate == 0xff) return; if (!iqkok) return; [unindented etc...] or combine the first 2 tests if (final_candidate == 0xff || !iqkok) return; [unindented etc...]