From: Marek Vasut <marek.vasut@gmail.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>,
linux-mtd@lists.infradead.org
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>,
Richard Weinberger <richard@nod.at>,
linux-kernel@vger.kernel.org,
Cyrille Pitchen <cyrille.pitchen@atmel.com>,
Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH 3/3] mtd: remove unneeded initializer in mtd_ooblayout_count_bytes()
Date: Sat, 12 Nov 2016 22:28:04 +0100 [thread overview]
Message-ID: <5795165c-0037-0ee2-9392-9310ba5dbf5e@gmail.com> (raw)
In-Reply-To: <1478657290-9430-4-git-send-email-yamada.masahiro@socionext.com>
On 11/09/2016 03:08 AM, Masahiro Yamada wrote:
> There is no need to initialize oobregion since it will be filled by
> the iterator.
>
> This function is called with mtd_ooblayout_free or mtd_ooblayout_ecc
> for the iterator; both of them calls memset() to clear the oobregion.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
> ---
>
> drivers/mtd/mtdcore.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
> index ca6a89a..ca661ce 100644
> --- a/drivers/mtd/mtdcore.c
> +++ b/drivers/mtd/mtdcore.c
> @@ -1354,7 +1354,7 @@ static int mtd_ooblayout_count_bytes(struct mtd_info *mtd,
> int section,
> struct mtd_oob_region *oobregion))
> {
> - struct mtd_oob_region oobregion = { };
> + struct mtd_oob_region oobregion;
> int section = 0, ret, nbytes = 0;
>
> while (1) {
>
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2016-11-12 21:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-09 2:08 [PATCH 0/3] mtd: some minor cleanups for ooblayout APIs Masahiro Yamada
2016-11-09 2:08 ` [PATCH 1/3] mtd: remove unneeded initializer in mtd_ooblayout_{get, set}_bytes() Masahiro Yamada
2016-11-12 21:25 ` Marek Vasut
2016-11-09 2:08 ` [PATCH 2/3] mtd: use min_t() to refactor " Masahiro Yamada
2016-11-12 21:27 ` Marek Vasut
2016-11-09 2:08 ` [PATCH 3/3] mtd: remove unneeded initializer in mtd_ooblayout_count_bytes() Masahiro Yamada
2016-11-12 21:28 ` Marek Vasut [this message]
2016-11-20 9:42 ` [PATCH 0/3] mtd: some minor cleanups for ooblayout APIs Boris Brezillon
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=5795165c-0037-0ee2-9392-9310ba5dbf5e@gmail.com \
--to=marek.vasut@gmail.com \
--cc=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@atmel.com \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=yamada.masahiro@socionext.com \
/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