From: Brian Norris <computersforpeace@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: David Woodhouse <dwmw2@infradead.org>,
linux-mtd@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
Ryan Harkin <ryan.harkin@linaro.org>,
Liviu Dudau <liviu.dudau@arm.com>
Subject: Re: [PATCH 07/10] mtd: factor out v1 partition parsing
Date: Tue, 10 Nov 2015 19:15:52 -0800 [thread overview]
Message-ID: <20151111031552.GY12143@google.com> (raw)
In-Reply-To: <1444914533-27782-8-git-send-email-linus.walleij@linaro.org>
Hi,
On Thu, Oct 15, 2015 at 03:08:50PM +0200, Linus Walleij wrote:
> This breaks out the parsing of v1 partitions so we can later add
> a v2 partition parser.
>
> 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 | 88 +++++++++++++++++++++++++++++++------------------------
> 1 file changed, 50 insertions(+), 38 deletions(-)
>
> diff --git a/drivers/mtd/afs.c b/drivers/mtd/afs.c
> index 2307f54195f5..ace27f447abc 100644
> --- a/drivers/mtd/afs.c
> +++ b/drivers/mtd/afs.c
> @@ -181,14 +181,18 @@ afs_read_iis_v1(struct mtd_info *mtd, struct image_info_v1 *iis, u_int ptr)
> return ret;
> }
>
> -static int parse_afs_partitions(struct mtd_info *mtd,
> - struct mtd_partition **pparts,
> - struct mtd_part_parser_data *data)
> +static int afs_parse_v1_partition(struct mtd_info *mtd,
> + u_int off, struct mtd_partition *part)
> {
> - struct mtd_partition *parts;
> - u_int mask, off, sz;
> - int ret = 0;
> - int i;
> + struct image_info_v1 iis;
> + u_int mask;
> + /*
> + * Static checks cannot see that we bail out if we have an error
> + * reading the footer.
> + */
> + u_int uninitialized_var(iis_ptr);
> + u_int uninitialized_var(img_ptr);
What's this uninitialized_var() stuff about? These variables seem to
clearly be initialized before use. Did this hang around from some
preliminary code that got refactored?
> + int ret;
>
> /*
> * This is the address mask; we use this to mask off out of
...
Otherwise, looks OK.
Brian
next prev parent reply other threads:[~2015-11-11 3:15 UTC|newest]
Thread overview: 22+ 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 ` [PATCH 01/10] mtd: afs: rename structs and functions for v1 Linus Walleij
2015-10-15 13:08 ` [PATCH 02/10] mtd: enable AFS selection for ARM64 Linus Walleij
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 ` [PATCH 05/10] mtd: afs: simplify " Linus Walleij
2015-11-11 2:28 ` Brian Norris
2015-10-15 13:08 ` [PATCH 06/10] mtd: afs: simplify partition detection Linus Walleij
2015-11-11 3:09 ` Brian Norris
2015-10-15 13:08 ` [PATCH 07/10] mtd: factor out v1 partition parsing Linus Walleij
2015-11-11 3:15 ` Brian Norris [this message]
2015-10-15 13:08 ` [PATCH 08/10] mtd: afs: factor footer parsing into the v1 part parsing Linus Walleij
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-11-11 18:09 ` Brian Norris
2015-10-15 13:08 ` [PATCH 10/10] mtd: afs: add v2 partition parsing Linus Walleij
2015-11-11 3:20 ` 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-11-11 2:15 ` Brian Norris
2015-11-11 15:13 ` Linus Walleij
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=20151111031552.GY12143@google.com \
--to=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linus.walleij@linaro.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).