Re: [PATCH 1/1 linux-next] mtd: cfi_cmdset_0002: use swap() in cfi_cmdset_0002()
Garbage collecting old patches... On Wed, Jun 10, 2015 at 06:31:32PM +0200, Fabian Frederick wrote: > Use kernel.h macro definition. > > Thanks to Julia Lawall for Coccinelle scripting support. > > Signed-off-by: Fabian Frederick Applied to l2-mtd.git -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/1 linux-next] mtd: cfi_cmdset_0002: use swap() in cfi_cmdset_0002()
Garbage collecting old patches... On Wed, Jun 10, 2015 at 06:31:32PM +0200, Fabian Frederick wrote: > Use kernel.h macro definition. > > Thanks to Julia Lawall for Coccinelle scripting support. > > Signed-off-by: Fabian FrederickApplied to l2-mtd.git -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1 linux-next] 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 --- drivers/mtd/chips/cfi_cmdset_0002.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index c3624eb..9dca881 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 */ -- 2.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1 linux-next] 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 f...@skynet.be --- drivers/mtd/chips/cfi_cmdset_0002.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index c3624eb..9dca881 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; icfi-cfiq-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 */ -- 2.4.2 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/