mtd: remove unused value for mtdoops
PATCH v2 1/1 mtd: remove unused value for mtdoops
MTD oops 'hdr' header is never used, drop its initialization
Signed-off-by Weitao Hou <[email protected]>
---
Changes in v2:
-fix comment for patch
--- drivers/mtd/mtdoops.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/mtd/mtdoops.c +0 -6
@@ -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);
Signature · 1 line
2.18.0
Variable hdr is used to initialise the memory at cxt->oops_buf, which is used.
Martin
Quoted 20 lines · Weitao Hou
MTD oops 'hdr' header is never used, drop its initialization
Signed-off-by Weitao Hou <[email protected]>---
Changes in v2:
-fix comment for patch--- drivers/mtd/mtdoops.c | 6 ------ 1 file changed, 6 deletions(-)drivers/mtd/mtdoops.c +0
-1@@ -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;
drivers/mtd/mtdoops.c static void mtdoops_write(struct mtdoops_context *cxt, int panic) · line 198
Quoted 10 lines
drivers/mtd/mtdoops.c +0
-5int 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);
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/