From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Weitao Hou <houweitaoo@gmail.com>
Cc: vigneshr@ti.com, richard@nod.at, linux-kernel@vger.kernel.org,
marek.vasut@gmail.com, linux-mtd@lists.infradead.org,
computersforpeace@gmail.com, dwmw2@infradead.org
Subject: Re: [PATCH] mtd: remove unused value for mtdoops
Date: Mon, 27 May 2019 14:20:00 +0200 [thread overview]
Message-ID: <20190527141939.57c93fb7@xps13> (raw)
In-Reply-To: <20190527121440.19271-1-houweitaoo@gmail.com>
Hi Weitao,
Weitao Hou <houweitaoo@gmail.com> wrote on Mon, 27 May 2019 20:14:40
+0800:
> since hdr was never used, we need not reserve and init it
What about "MTD oops 'hdr' header is never used, drop its
initialization."
Maybe a Fixes tag would be appropriate.
>
> Signed-off-by: Weitao Hou <houweitaoo@gmail.com>
> ---
> drivers/mtd/mtdoops.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/mtd/mtdoops.c b/drivers/mtd/mtdoops.c
> index e078fc41aa61..6ae4b70ebdbb 100644
> --- a/drivers/mtd/mtdoops.c
> +++ b/drivers/mtd/mtdoops.c
> @@ -191,14 +191,8 @@ static void mtdoops_write(struct mtdoops_context *cxt, int panic)
> {
> struct mtd_info *mtd = cxt->mtd;
> size_t retlen;
> - u32 *hdr;
> int ret;
>
> - /* Add mtdoops header to the buffer */
> - hdr = cxt->oops_buf;
> - hdr[0] = cxt->nextcount;
> - hdr[1] = MTDOOPS_KERNMSG_MAGIC;
> -
> if (panic) {
> ret = mtd_panic_write(mtd, cxt->nextpage * record_size,
> record_size, &retlen, cxt->oops_buf);
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
prev parent reply other threads:[~2019-05-27 12:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-27 12:14 [PATCH] mtd: remove unused value for mtdoops Weitao Hou
2019-05-27 12:20 ` Miquel Raynal [this message]
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=20190527141939.57c93fb7@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=houweitaoo@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=richard@nod.at \
--cc=vigneshr@ti.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