mtd: remove unneeded initializer in mtd_ooblayout_{get, set}_bytes()

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Dec 16 11:59:12 PST 2016


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=8e8fd4d1e83ef7d64f260b4d8d928ab44cc1ce07
Commit:     8e8fd4d1e83ef7d64f260b4d8d928ab44cc1ce07
Parent:     442168273ecf57cf4494e492a59f29991089ff42
Author:     Masahiro Yamada <yamada.masahiro at socionext.com>
AuthorDate: Wed Nov 9 11:08:08 2016 +0900
Committer:  Boris Brezillon <boris.brezillon at free-electrons.com>
CommitDate: Sat Nov 19 19:31:29 2016 +0100

    mtd: remove unneeded initializer in mtd_ooblayout_{get, set}_bytes()
    
    There is no need to initialize oobregion and section since they will
    be filled by mtd_ooblayout_find_region().
    
    Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
    Reviewed-by: Marek Vasut <marek.vasut at gmail.com>
    Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com>
---
 drivers/mtd/mtdcore.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index d46e4ad..cf85f2b 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -1274,8 +1274,8 @@ static int mtd_ooblayout_get_bytes(struct mtd_info *mtd, u8 *buf,
 					    int section,
 					    struct mtd_oob_region *oobregion))
 {
-	struct mtd_oob_region oobregion = { };
-	int section = 0, ret;
+	struct mtd_oob_region oobregion;
+	int section, ret;
 
 	ret = mtd_ooblayout_find_region(mtd, start, &section,
 					&oobregion, iter);
@@ -1317,8 +1317,8 @@ static int mtd_ooblayout_set_bytes(struct mtd_info *mtd, const u8 *buf,
 					    int section,
 					    struct mtd_oob_region *oobregion))
 {
-	struct mtd_oob_region oobregion = { };
-	int section = 0, ret;
+	struct mtd_oob_region oobregion;
+	int section, ret;
 
 	ret = mtd_ooblayout_find_region(mtd, start, &section,
 					&oobregion, iter);



More information about the linux-mtd-cvs mailing list