Skip to contentSkip to conversation

remoteproc: Fixup coredump debugfs disable request

PATCH Superseded Sibi Sankar 2 participants 3 messages Sep 15, 2020

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remoteproc: Fixup coredump debugfs disable request

Currently the coredump debugfs entry takes in "disable" to set the coredump state to "disabled". Let's just accept the expected state instead.

Fixes 3afdc59e43904 ("remoteproc: Add coredump debugfs entry")
---
 drivers/remoteproc/remoteproc_debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/remoteproc_debugfs.c +1 -1
index 2e3b3e22e1d01..7ca823f6aa638 100644
@@ -94,7 +94,7 @@ static ssize_t rproc_coredump_write(struct file *filp,
 		goto out;
 	}
 
-	if (!strncmp(buf, "disable", count)) {
+	if (!strncmp(buf, "disabled", count)) {
 		rproc->dump_conf = RPROC_COREDUMP_DISABLED;
 	} else if (!strncmp(buf, "inline", count)) {
 		rproc->dump_conf = RPROC_COREDUMP_INLINE;
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#1 lore raw
Quoted 4 lines · Sibi Sankar

Currently the coredump debugfs entry takes in "disable" to set the coredump state to "disabled". Let's just accept the expected state instead.

I like this patch, but rather than arguing that it should match the name of the internal state I think you should either argue that when read you get "disabled" back or that "disabled" would make it consistent with the recovery.

Regards,
Bjorn

Quoted 23 lines
Fixes 3afdc59e43904 ("remoteproc: Add coredump debugfs entry")
---
 drivers/remoteproc/remoteproc_debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/remoteproc_debugfs.c +1 -1
index 2e3b3e22e1d01..7ca823f6aa638 100644
@@ -94,7 +94,7 @@ static ssize_t rproc_coredump_write(struct file *filp,
 		goto out;
 	}
 
-	if (!strncmp(buf, "disable", count)) {
+	if (!strncmp(buf, "disabled", count)) {
 		rproc->dump_conf = RPROC_COREDUMP_DISABLED;
 	} else if (!strncmp(buf, "inline", count)) {
 		rproc->dump_conf = RPROC_COREDUMP_INLINE;
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#2 lore raw

Hey Bjorn,
Thanks for taking time to review the
patch.

Quoted 11 lines · Bjorn Andersson
Quoted 4 lines · Sibi Sankar

Currently the coredump debugfs entry takes in "disable" to set the coredump state to "disabled". Let's just accept the expected state instead.

I like this patch, but rather than arguing that it should match the name of the internal state I think you should either argue that when read you get "disabled" back or that "disabled" would make it consistent with the recovery.

Sure, I'll re-word the commit message.
I probably choose the read back argument
because that's what was odd about it in
the first place.

Quoted 28 lines

Regards,
Bjorn

Quoted 24 lines
Fixes 3afdc59e43904 ("remoteproc: Add coredump debugfs entry")
---
 drivers/remoteproc/remoteproc_debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/remoteproc_debugfs.c +1 -1
index 2e3b3e22e1d01..7ca823f6aa638 100644
@@ -94,7 +94,7 @@ static ssize_t rproc_coredump_write(struct file 
 *filp,
 		goto out;
 	}
 
-	if (!strncmp(buf, "disable", count)) {
+	if (!strncmp(buf, "disabled", count)) {
 		rproc->dump_conf = RPROC_COREDUMP_DISABLED;
 	} else if (!strncmp(buf, "inline", count)) {

rproc->dump_conf = RPROC_COREDUMP_INLINE;
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project.