From: Fabian Frederick Date: Wed, 10 Jun 2015 16:31:32 +0000 (+0200) Subject: mtd: cfi_cmdset_0002: use swap() in cfi_cmdset_0002() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fdd9d27c8a47ea81daeaddfe6c0156ae7cf68096;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mtd: cfi_cmdset_0002: use swap() in cfi_cmdset_0002() Use kernel.h macro definition. Thanks to Julia Lawall for Coccinelle scripting support. Signed-off-by: Fabian Frederick Signed-off-by: Brian Norris --- diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index c3624eb571d1..9dca881bb378 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c @@ -615,11 +615,9 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) for (i=0; icfiq->NumEraseRegions / 2; i++) { int j = (cfi->cfiq->NumEraseRegions-1)-i; - __u32 swap; - swap = cfi->cfiq->EraseRegionInfo[i]; - cfi->cfiq->EraseRegionInfo[i] = cfi->cfiq->EraseRegionInfo[j]; - cfi->cfiq->EraseRegionInfo[j] = swap; + swap(cfi->cfiq->EraseRegionInfo[i], + cfi->cfiq->EraseRegionInfo[j]); } } /* Set the default CFI lock/unlock addresses */