mtd: afs: break out v1 footer magic to a define
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Tue Jan 12 15:59:02 PST 2016
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=9498440fff21649cabe529f1d9d4e3bc668fc125
Commit: 9498440fff21649cabe529f1d9d4e3bc668fc125
Parent: 8cf980185d2bf672a5c1d03935f1f165836bb4b0
Author: Linus Walleij <linus.walleij at linaro.org>
AuthorDate: Thu Oct 15 15:08:46 2015 +0200
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Tue Nov 10 17:56:06 2015 -0800
mtd: afs: break out v1 footer magic to a define
Break out the magic number to a #defined constant.
Cc: Ryan Harkin <ryan.harkin at linaro.org>
Cc: Liviu Dudau <liviu.dudau at arm.com>
Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
drivers/mtd/afs.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/afs.c b/drivers/mtd/afs.c
index 9af0052..d09280a 100644
--- a/drivers/mtd/afs.c
+++ b/drivers/mtd/afs.c
@@ -34,6 +34,8 @@
#include <linux/mtd/map.h>
#include <linux/mtd/partitions.h>
+#define AFSV1_FOOTER_MAGIC 0xA0FFFF9F
+
struct footer_v1 {
u32 image_info_base; /* Address of first word of ImageFooter */
u32 image_start; /* Start of area reserved by this footer */
@@ -90,7 +92,7 @@ afs_read_footer_v1(struct mtd_info *mtd, u_int *img_start, u_int *iis_start,
/*
* Does it contain the magic number?
*/
- if (fs.signature != 0xa0ffff9f)
+ if (fs.signature != AFSV1_FOOTER_MAGIC)
ret = 0;
/*
More information about the linux-mtd-cvs
mailing list