From: Richard Weinberger <richard@nod.at>
To: computersforpeace@gmail.com
Cc: linux-mtd@lists.infradead.org, dwmw2@infradead.org,
linux-kernel@vger.kernel.org, Richard Weinberger <richard@nod.at>
Subject: [PATCH] mtd: nand: Remove in vain memset() in nand_onfi_get_features()
Date: Wed, 25 Mar 2015 14:33:09 +0100 [thread overview]
Message-ID: <1427290389-14495-1-git-send-email-richard@nod.at> (raw)
As all four bytes are written in any case the memset() is in vain.
Signed-off-by: Richard Weinberger <richard@nod.at>
---
drivers/mtd/nand/nand_base.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index df7eb4f..030a043 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2909,9 +2909,6 @@ static int nand_onfi_get_features(struct mtd_info *mtd, struct nand_chip *chip,
& ONFI_OPT_CMD_SET_GET_FEATURES))
return -EINVAL;
- /* clear the sub feature parameters */
- memset(subfeature_param, 0, ONFI_SUBFEATURE_PARAM_LEN);
-
chip->cmdfunc(mtd, NAND_CMD_GET_FEATURES, addr, -1);
for (i = 0; i < ONFI_SUBFEATURE_PARAM_LEN; ++i)
*subfeature_param++ = chip->read_byte(mtd);
--
1.8.4.5
next reply other threads:[~2015-03-25 13:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-25 13:33 Richard Weinberger [this message]
2015-05-07 6:45 ` [PATCH] mtd: nand: Remove in vain memset() in nand_onfi_get_features() 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=1427290389-14495-1-git-send-email-richard@nod.at \
--to=richard@nod.at \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.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).