Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755501AbbFLQ7M (ORCPT ); Fri, 12 Jun 2015 12:59:12 -0400 Received: from mailrelay108.isp.belgacom.be ([195.238.20.135]:1917 "EHLO mailrelay108.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755245AbbFLQ7B (ORCPT ); Fri, 12 Jun 2015 12:59:01 -0400 X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=E12Nk8Bf0hMlwhhcPGlCWJx/tbvGdtmOO6CYG/XBrkw= c=1 sm=2 a=Iygw4oVOh8vnrt-MI1UA:9 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2DyeQDGDntV/zoHQFdcgXKBHgGBMqtVBQEFBQGBBJJghgmBQj0QAQEBAQEBAYEKQQOEDC8jgRo3iDMB1xmGGYowHYQXBZ8SjU6KOiZjZgELNhyBVDwxgkcBAQE From: Fabian Frederick To: linux-kernel@vger.kernel.org Cc: Julia Lawall , Fabian Frederick , "J. Bruce Fields" , linux-nfs@vger.kernel.org Subject: [PATCH 1/1 linux-next] nfsd: use swap() in sort_pacl_range() Date: Fri, 12 Jun 2015 18:58:57 +0200 Message-Id: <1434128337-10366-1-git-send-email-fabf@skynet.be> X-Mailer: git-send-email 2.4.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1324 Lines: 41 Use kernel.h macro definition. Thanks to Julia Lawall for Coccinelle scripting support. Signed-off-by: Fabian Frederick --- fs/nfsd/nfs4acl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/nfsd/nfs4acl.c b/fs/nfsd/nfs4acl.c index 7e10e2a..eb5accf 100644 --- a/fs/nfsd/nfs4acl.c +++ b/fs/nfsd/nfs4acl.c @@ -372,7 +372,6 @@ pace_gt(struct posix_acl_entry *pace1, struct posix_acl_entry *pace2) static void sort_pacl_range(struct posix_acl *pacl, int start, int end) { int sorted = 0, i; - struct posix_acl_entry tmp; /* We just do a bubble sort; easy to do in place, and we're not * expecting acl's to be long enough to justify anything more. */ @@ -382,9 +381,8 @@ sort_pacl_range(struct posix_acl *pacl, int start, int end) { if (pace_gt(&pacl->a_entries[i], &pacl->a_entries[i+1])) { sorted = 0; - tmp = pacl->a_entries[i]; - pacl->a_entries[i] = pacl->a_entries[i+1]; - pacl->a_entries[i+1] = tmp; + swap(pacl->a_entries[i], + pacl->a_entries[i + 1]); } } } -- 2.4.2 -- 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/