Skip to contentSkip to conversation

mtd: set master partition panic write flag

PATCH Superseded Kamal Dasu 2 participants 3 messages May 4, 2020 – Jun 15, 2020 Memory technology devices (MTD)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Kamal Dasu

author
#0 lore raw

PATCH 1/1 mtd: set master partition panic write flag

Check and set master panic write flag so that low level drivers can use it to take required action to ensure oops data gets written to assigned mtdoops device partition.

---
 drivers/mtd/mtdcore.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/mtdcore.c +2 -2
index 2916674208b3..7e37ed2f38ea 100644
@@ -1235,8 +1235,8 @@ int mtd_panic_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen,
 		return -EROFS;
 	if (!len)
 		return 0;
-	if (!mtd->oops_panic_write)
-		mtd->oops_panic_write = true;
+	if (!master->oops_panic_write)
+		master->oops_panic_write = true;
 
 	return master->_panic_write(master, mtd_get_master_ofs(mtd, to), len,
 				    retlen, buf);
Signature · 1 line
2.17.1
author
#1 lore raw

Can you please accept this if there are no objections.

Kamal

Quoted 29 lines · Kamal Dasu

Check and set master panic write flag so that low level drivers can use it to take required action to ensure oops data gets written to assigned mtdoops device partition.

---
drivers/mtd/mtdcore.c | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/mtdcore.c +2 -2
index 2916674208b3..7e37ed2f38ea 100644
@@ -1235,8 +1235,8 @@ int mtd_panic_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen,
       return -EROFS;
   if (!len)
       return 0;
-    if (!mtd->oops_panic_write)
-        mtd->oops_panic_write = true;
+    if (!master->oops_panic_write)
+        master->oops_panic_write = true;
 
   return master->_panic_write(master, mtd_get_master_ofs(mtd, to), len,
                   retlen, buf);
Signature · 1 line
2.17.1

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

maintainer
#2 lore raw

Hi Kamal,

Kamal Dasu <[email protected]> wrote on Sat, 13 Jun 2020 02:49:31 -0400:

Quoted 28 lines

Can you please accept this if there are no objections.

Kamal

Quoted 24 lines · Kamal Dasu

Check and set master panic write flag so that low level drivers can use it to take required action to ensure oops data gets written to assigned mtdoops device partition.

---
drivers/mtd/mtdcore.c | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/mtdcore.c +2 -2
index 2916674208b3..7e37ed2f38ea 100644
@@ -1235,8 +1235,8 @@ int mtd_panic_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen,
       return -EROFS;
   if (!len)
       return 0;
-    if (!mtd->oops_panic_write)
-        mtd->oops_panic_write = true;
+    if (!master->oops_panic_write)
+        master->oops_panic_write = true;
 
Quoted 5 lines
Quoted 5 lines
drivers/mtd/mtdcore.c +0 -0
   return master->_panic_write(master, mtd_get_master_ofs(mtd, to), len,
                   retlen, buf);
Signature · 1 line
2.17.1

I thing we missed it. However, shouldn't we have a Cc:/Fixes: pair of tags here? We could send it as part of a fixes PR then.

Thanks,
Miquèl