Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932173AbbERVhV (ORCPT ); Mon, 18 May 2015 17:37:21 -0400 Received: from ipmail04.adl6.internode.on.net ([150.101.137.141]:51075 "EHLO ipmail04.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752152AbbERVhS (ORCPT ); Mon, 18 May 2015 17:37:18 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2DGBwB3WlpVPPDOLHlcgxCBMoZMrC0GmUwCAgEBAoE3TQEBAQEBAQcBAQEBQT+EIwEBBCcLASMWCgMQCAMOCgklDwUlAwcaE4gr2SoBCwEfGIV+hSSFBQeELQEEmV6EAIEog2iCfYR5gjKHVYEEgyksMYJGAQEB Date: Tue, 19 May 2015 07:37:14 +1000 From: Dave Chinner To: Fabian Frederick Cc: Al Viro , linux-kernel@vger.kernel.org, xfs@oss.sgi.com Subject: Re: [PATCH 1/4 linux-next] xfs: use swap() in xfs_dir2_leafn_rebalance() Message-ID: <20150518213714.GV15721@dastard> References: <1431969231-12834-1-git-send-email-fabf@skynet.be> <20150518171946.GY7232@ZenIV.linux.org.uk> <1618479490.17551.1431972373169.open-xchange@webmail.nmp.proximus.be> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1618479490.17551.1431972373169.open-xchange@webmail.nmp.proximus.be> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1902 Lines: 46 On Mon, May 18, 2015 at 08:06:13PM +0200, Fabian Frederick wrote: > > > > On 18 May 2015 at 19:19 Al Viro wrote: > > > > > > On Mon, May 18, 2015 at 07:13:48PM +0200, Fabian Frederick wrote: > > >? ? ? * If the block order is wrong, swap the arguments. > > >? ? ? */ > > > -? ?if ((swap = xfs_dir2_leafn_order(dp, blk1->bp, blk2->bp))) { > > > -? ? ? ? ? ?xfs_da_state_blk_t? ? ? *tmp;? ?/* temp for block swap */ > > > +? ?swap = xfs_dir2_leafn_order(dp, blk1->bp, blk2->bp); > > > +? ?if (swap) > > > +? ? ? ? ? ?swap(blk1, blk2); > > > > Egads...? Have you even read what you'd written?? Yes, sure, preprocessor > > will do the right thing, but it's a very noticable annoyance for somebody > > reading that.? Rename the bleeding flag, please. > > I wanted to focus on the swap() update in this small patchset (some other things > should be done in there like have xfs_dir2_leafn_order() return bool) but I can > rename it in something like need_swap. Do I need to resend the 4 patches Dave ? 4 patches is 3 patches too many for noise like this. Anyway, two of the patches have the same local "swap" variable problem; the context is "swap order" not "need swap". FWIW, I am not a fan of changing the code for no actual gain - the compiled code is identical, there are no stack savings, and now I have to look at an extra file to work out what the code does. If you're changing the code and this is prep work for a large series, then by all means clean the code up. But otherwise, changes like this just mean work that other developers have in progress need rebasing.... Cheers, Dave. -- Dave Chinner david@fromorbit.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/