* [PATCH] mtd: nand: Remove in vain memset() in nand_onfi_get_features()
@ 2015-03-25 13:33 Richard Weinberger
2015-05-07 6:45 ` Brian Norris
0 siblings, 1 reply; 2+ messages in thread
From: Richard Weinberger @ 2015-03-25 13:33 UTC (permalink / raw)
To: computersforpeace; +Cc: linux-mtd, dwmw2, linux-kernel, Richard Weinberger
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mtd: nand: Remove in vain memset() in nand_onfi_get_features()
2015-03-25 13:33 [PATCH] mtd: nand: Remove in vain memset() in nand_onfi_get_features() Richard Weinberger
@ 2015-05-07 6:45 ` Brian Norris
0 siblings, 0 replies; 2+ messages in thread
From: Brian Norris @ 2015-05-07 6:45 UTC (permalink / raw)
To: Richard Weinberger; +Cc: linux-mtd, dwmw2, linux-kernel
On Wed, Mar 25, 2015 at 02:33:09PM +0100, Richard Weinberger wrote:
> As all four bytes are written in any case the memset() is in vain.
>
> Signed-off-by: Richard Weinberger <richard@nod.at>
Applied to l2-mtd.git.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-07 6:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-25 13:33 [PATCH] mtd: nand: Remove in vain memset() in nand_onfi_get_features() Richard Weinberger
2015-05-07 6:45 ` Brian Norris
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).