[PATCH] firmware: cs_dsp: Replace the obscure "invalid magic" messages

From: Richard Fitzgerald

Date: Fri Nov 06 2026 - 10:02:32 EST


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

Signed-off-by: Richard Fitzgerald <rf@xxxxxxxxxxxxxxxxxxxxx>
---
drivers/firmware/cirrus/cs_dsp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/firmware/cirrus/cs_dsp.c b/drivers/firmware/cirrus/cs_dsp.c
index 4dcce87685d3..a7e2a4fb0894 100644
--- a/drivers/firmware/cirrus/cs_dsp.c
+++ b/drivers/firmware/cirrus/cs_dsp.c
@@ -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;
}

--
2.47.3