From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751898AbdFOQ6w (ORCPT ); Thu, 15 Jun 2017 12:58:52 -0400 Received: from smtprelay0187.hostedemail.com ([216.40.44.187]:38860 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750803AbdFOQ6v (ORCPT ); Thu, 15 Jun 2017 12:58:51 -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:2693:2828:3138:3139:3140:3141:3142:3354:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4321:5007:7901:7903:10004:10400:10848:11026:11232:11473:11657:11658:11914:12043:12296:12740:12760:12895:13069:13149:13230:13255:13311:13357:13439:14096:14097:14659:14721:21080:21324:21627:30012:30054:30060:30070: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:1,LUA_SUMMARY:none X-HE-Tag: waves43_8727c2e8f4523 X-Filterd-Recvd-Size: 2993 Message-ID: <1497545926.14396.11.camel@perches.com> Subject: Re: [PATCH 6/6] staging: lustre: lustre: fix all braces issues reported by checkpatch From: Joe Perches To: James Simmons Cc: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger , Oleg Drokin , Linux Kernel Mailing List , Lustre Development List Date: Thu, 15 Jun 2017 09:58:46 -0700 In-Reply-To: References: <1497452481-31124-1-git-send-email-jsimmons@infradead.org> <1497452481-31124-7-git-send-email-jsimmons@infradead.org> <1497464706.18751.62.camel@perches.com> 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 On Thu, 2017-06-15 at 17:38 +0100, James Simmons wrote: > > On Wed, 2017-06-14 at 11:01 -0400, James Simmons wrote: > > > Cleanup all braces that was reported by checkpatch. The only > > > issue not fixed up is in mdc_lock.c. Removing the braces in > > > the case of mdc_lock.c will break the build. > > > > [] > > > > > diff --git a/drivers/staging/lustre/lustre/llite/vvp_dev.c b/drivers/staging/lustre/lustre/llite/vvp_dev.c > > > > [] > > > @@ -591,9 +591,10 @@ static void *vvp_pgcache_start(struct seq_file *f, loff_t *pos) > > > env = cl_env_get(&refcheck); > > > if (!IS_ERR(env)) { > > > sbi = f->private; > > > - if (sbi->ll_site->ls_obj_hash->hs_cur_bits > 64 - PGC_OBJ_SHIFT) > > > + if (sbi->ll_site->ls_obj_hash->hs_cur_bits > > > > + 64 - PGC_OBJ_SHIFT) { > > > pos = ERR_PTR(-EFBIG); > > > - else { > > > + } else { > > > *pos = vvp_pgcache_find(env, &sbi->ll_cl->cd_lu_dev, > > > *pos); > > > if (*pos == ~0ULL) > > > > Sometimes is nicer to rearrange the code with smaller > > indentation by using early returns and/or goto . > > Do you mind if I submit a separate patch for this? > It would be nice to land the current cleanups as is. Of course not. > Looking at the code I see where more > simplication along this line can be done. I submitted a patch for our > test harness: Oh good. > In the near future it will be pushed here. Swell. One of the blocks in vvp_pgcache_show looks like it has asymmetric braces though. } else Perhaps you should be using the linux-next version of checkpatch which warns about this. And don't take any of what I wrote as a requirement. All were merely suggestions and could be implemented an appropriate time or ignored completely.