From: Linus Walleij <linus.walleij@linaro.org> To: David Woodhouse <dwmw2@infradead.org>, Brian Norris <computersforpeace@gmail.com>, linux-mtd@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org, Linus Walleij <linus.walleij@linaro.org>, Ryan Harkin <ryan.harkin@linaro.org>, Liviu Dudau <liviu.dudau@arm.com> Subject: [PATCH 03/10] mtd: afs: break out v1 footer magic to a define Date: Thu, 15 Oct 2015 15:08:46 +0200 [thread overview] Message-ID: <1444914533-27782-4-git-send-email-linus.walleij@linaro.org> (raw) In-Reply-To: <1444914533-27782-1-git-send-email-linus.walleij@linaro.org> Break out the magic number to a #defined constant. Cc: Ryan Harkin <ryan.harkin@linaro.org> Cc: Liviu Dudau <liviu.dudau@arm.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- 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 9af00528586f..d09280ae12bd 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; /* -- 2.4.3
WARNING: multiple messages have this Message-ID (diff)
From: linus.walleij@linaro.org (Linus Walleij) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 03/10] mtd: afs: break out v1 footer magic to a define Date: Thu, 15 Oct 2015 15:08:46 +0200 [thread overview] Message-ID: <1444914533-27782-4-git-send-email-linus.walleij@linaro.org> (raw) In-Reply-To: <1444914533-27782-1-git-send-email-linus.walleij@linaro.org> Break out the magic number to a #defined constant. Cc: Ryan Harkin <ryan.harkin@linaro.org> Cc: Liviu Dudau <liviu.dudau@arm.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- 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 9af00528586f..d09280ae12bd 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; /* -- 2.4.3
next prev parent reply other threads:[~2015-10-15 13:09 UTC|newest] Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-10-15 13:08 [PATCH 00/10] ARM MTD AFS v2 partition support Linus Walleij 2015-10-15 13:08 ` Linus Walleij 2015-10-15 13:08 ` [PATCH 01/10] mtd: afs: rename structs and functions for v1 Linus Walleij 2015-10-15 13:08 ` Linus Walleij 2015-10-15 13:08 ` [PATCH 02/10] mtd: enable AFS selection for ARM64 Linus Walleij 2015-10-15 13:08 ` Linus Walleij 2015-10-15 13:08 ` Linus Walleij [this message] 2015-10-15 13:08 ` [PATCH 03/10] mtd: afs: break out v1 footer magic to a define Linus Walleij 2015-10-15 13:08 ` [PATCH 04/10] mtd: afs: refactor v1 partition parsing Linus Walleij 2015-10-15 13:08 ` Linus Walleij 2015-10-15 13:08 ` [PATCH 05/10] mtd: afs: simplify " Linus Walleij 2015-10-15 13:08 ` Linus Walleij 2015-11-11 2:28 ` Brian Norris 2015-11-11 2:28 ` Brian Norris 2015-10-15 13:08 ` [PATCH 06/10] mtd: afs: simplify partition detection Linus Walleij 2015-10-15 13:08 ` Linus Walleij 2015-11-11 3:09 ` Brian Norris 2015-11-11 3:09 ` Brian Norris 2015-10-15 13:08 ` [PATCH 07/10] mtd: factor out v1 partition parsing Linus Walleij 2015-10-15 13:08 ` Linus Walleij 2015-11-11 3:15 ` Brian Norris 2015-11-11 3:15 ` Brian Norris 2015-10-15 13:08 ` [PATCH 08/10] mtd: afs: factor footer parsing into the v1 part parsing Linus Walleij 2015-10-15 13:08 ` Linus Walleij 2015-11-11 3:17 ` Brian Norris 2015-11-11 3:17 ` Brian Norris 2015-10-15 13:08 ` [PATCH 09/10] mtd: afs: factor the IIS read into partition parser Linus Walleij 2015-10-15 13:08 ` Linus Walleij 2015-11-11 18:09 ` Brian Norris 2015-11-11 18:09 ` Brian Norris 2015-10-15 13:08 ` [PATCH 10/10] mtd: afs: add v2 partition parsing Linus Walleij 2015-10-15 13:08 ` Linus Walleij 2015-11-11 3:20 ` Brian Norris 2015-11-11 3:20 ` Brian Norris 2015-11-11 18:46 ` Brian Norris 2015-11-11 18:46 ` Brian Norris 2015-10-26 13:10 ` [PATCH 00/10] ARM MTD AFS v2 partition support Linus Walleij 2015-10-26 13:10 ` Linus Walleij 2015-11-11 2:15 ` Brian Norris 2015-11-11 2:15 ` Brian Norris 2015-11-11 15:13 ` Linus Walleij 2015-11-11 15:13 ` Linus Walleij 2015-11-11 18:01 ` Brian Norris 2015-11-11 18:01 ` Brian Norris
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1444914533-27782-4-git-send-email-linus.walleij@linaro.org \ --to=linus.walleij@linaro.org \ --cc=computersforpeace@gmail.com \ --cc=dwmw2@infradead.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-mtd@lists.infradead.org \ --cc=liviu.dudau@arm.com \ --cc=ryan.harkin@linaro.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.