Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752835AbbERROE (ORCPT ); Mon, 18 May 2015 13:14:04 -0400 Received: from mailrelay116.isp.belgacom.be ([195.238.20.143]:57530 "EHLO mailrelay116.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751073AbbERROB (ORCPT ); Mon, 18 May 2015 13:14:01 -0400 X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=Ax9Kd9og7W2htzcJF9odWb+87PP6pPoG1t8Q07ebhfo= c=1 sm=2 a=DL0QXmwMRYN-3m39adcA:9 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2CgDgCOHFpV/4FIiNlcgxCBMrJoCwUBgQSYToE1PRABAQEBAQEBgQpBA4QMLyOBGjeIMAHYf4YWiikdhBcFmV6EAY0FigcjYWYBgjI8MYJGAQEB From: Fabian Frederick To: linux-kernel@vger.kernel.org Cc: Fabian Frederick , Dave Chinner , xfs@oss.sgi.com Subject: [PATCH 1/4 linux-next] xfs: use swap() in xfs_dir2_leafn_rebalance() Date: Mon, 18 May 2015 19:13:48 +0200 Message-Id: <1431969231-12834-1-git-send-email-fabf@skynet.be> X-Mailer: git-send-email 2.4.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1242 Lines: 41 Use kernel.h macro definition. Also remove assignment in if condition (checkpatch error) Signed-off-by: Fabian Frederick --- fs/xfs/libxfs/xfs_dir2_node.c | 8 ++------ Signed-off-by: Fabian Frederick --- fs/xfs/libxfs/xfs_dir2_node.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fs/xfs/libxfs/xfs_dir2_node.c b/fs/xfs/libxfs/xfs_dir2_node.c index 41b80d3..84442a6 100644 --- a/fs/xfs/libxfs/xfs_dir2_node.c +++ b/fs/xfs/libxfs/xfs_dir2_node.c @@ -967,13 +967,10 @@ xfs_dir2_leafn_rebalance( /* * 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); - tmp = blk1; - blk1 = blk2; - blk2 = tmp; - } leaf1 = blk1->bp->b_addr; leaf2 = blk2->bp->b_addr; dp->d_ops->leaf_hdr_from_disk(&hdr1, leaf1); -- 2.4.0 -- 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/