* [PATCH 1/1 linux-next] mtd: cfi_cmdset_0002: use swap() in cfi_cmdset_0002()
@ 2015-06-10 16:31 Fabian Frederick
2015-12-19 0:57 ` Brian Norris
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2015-06-10 16:31 UTC (permalink / raw)
To: linux-kernel
Cc: Fabian Frederick, Julia Lawall, Brian Norris, David Woodhouse,
linux-mtd
Use kernel.h macro definition.
Thanks to Julia Lawall for Coccinelle scripting support.
Signed-off-by: Fabian Frederick <fabf@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; i<cfi->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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-12-19 0:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-10 16:31 [PATCH 1/1 linux-next] mtd: cfi_cmdset_0002: use swap() in cfi_cmdset_0002() Fabian Frederick
2015-12-19 0:57 ` Brian Norris
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).