Skip to contentSkip to conversation

firmware: cs_dsp: Replace the obscure "invalid magic" messages

PATCH In review Richard Fitzgerald 2 participants 2 messages Nov 6 – Nov 8

Subsystems (2)
lore
Share & tools
lore

Richard Fitzgerald

author maintainer
#0 lore raw

PATCH 1/1 firmware: cs_dsp: Replace the obscure "invalid magic" messages

Replace the obscure "invalid magic" messages with messages that say what the actual problem is: the file is not the expected type.

---
 drivers/firmware/cirrus/cs_dsp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/firmware/cirrus/cs_dsp.c +2 -2
index 4dcce87685d3..a7e2a4fb0894 100644
@@ -1551,7 +1551,7 @@ static int cs_dsp_load(struct cs_dsp *dsp, const struct firmware *firmware,
 	header = (void *)&firmware->data[0];
 
 	if (memcmp(&header->magic[0], "WMFW", 4) != 0) {
-		cs_dsp_err(dsp, "%s: invalid magic\n", file);
+		cs_dsp_err(dsp, "%s: not a WMFW file\n", file);
 		goto out_fw;
 	}
 
@@ -2243,7 +2243,7 @@ static int cs_dsp_load_coeff(struct cs_dsp *dsp, const struct firmware *firmware
 
 	hdr = (void *)&firmware->data[0];
 	if (memcmp(hdr->magic, "WMDR", 4) != 0) {
-		cs_dsp_err(dsp, "%s: invalid coefficient magic\n", file);
+		cs_dsp_err(dsp, "%s: not a WMDR file\n", file);
 		goto out_fw;
 	}
 
Signature · 1 line
2.47.3
#1 lore raw
Quoted 2 lines

Replace the obscure "invalid magic" messages with messages that say what the actual problem is: the file is not the expected type.

The flip side of this is that the error message no longer says what the reason the file is not considered acceptable is...

Signature · 1 line
Mark Brown <[email protected]>