Skip to content

Commit 991b1de

Browse files
simontrimmerbroonie
authored andcommitted
ASoC: wm_adsp: Simplify the logging of requested firmware files
This change makes the logging of firmware files more consistent and simplifies the code - a debug message is logged whether the requested file was found or not and this applies to both wmfw and bin files. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230320112245.115720-8-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 0e7d82c commit 991b1de

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sound/soc/codecs/wm_adsp.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,8 @@ static int wm_adsp_request_firmware_file(struct wm_adsp *dsp,
787787
adsp_dbg(dsp, "Failed to request '%s'\n", *filename);
788788
kfree(*filename);
789789
*filename = NULL;
790+
} else {
791+
adsp_dbg(dsp, "Found '%s'\n", *filename);
790792
}
791793

792794
return ret;
@@ -807,7 +809,6 @@ static int wm_adsp_request_firmware_files(struct wm_adsp *dsp,
807809
if (!wm_adsp_request_firmware_file(dsp, wmfw_firmware, wmfw_filename,
808810
cirrus_dir, system_name,
809811
asoc_component_prefix, "wmfw")) {
810-
adsp_dbg(dsp, "Found '%s'\n", *wmfw_filename);
811812
wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename,
812813
cirrus_dir, system_name,
813814
asoc_component_prefix, "bin");
@@ -819,7 +820,6 @@ static int wm_adsp_request_firmware_files(struct wm_adsp *dsp,
819820
if (!wm_adsp_request_firmware_file(dsp, wmfw_firmware, wmfw_filename,
820821
cirrus_dir, system_name,
821822
NULL, "wmfw")) {
822-
adsp_dbg(dsp, "Found '%s'\n", *wmfw_filename);
823823
if (asoc_component_prefix)
824824
wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename,
825825
cirrus_dir, system_name,
@@ -835,7 +835,6 @@ static int wm_adsp_request_firmware_files(struct wm_adsp *dsp,
835835

836836
if (!wm_adsp_request_firmware_file(dsp, wmfw_firmware, wmfw_filename,
837837
"", NULL, NULL, "wmfw")) {
838-
adsp_dbg(dsp, "Found '%s'\n", *wmfw_filename);
839838
wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename,
840839
"", NULL, NULL, "bin");
841840
return 0;
@@ -844,7 +843,6 @@ static int wm_adsp_request_firmware_files(struct wm_adsp *dsp,
844843
ret = wm_adsp_request_firmware_file(dsp, wmfw_firmware, wmfw_filename,
845844
cirrus_dir, NULL, NULL, "wmfw");
846845
if (!ret) {
847-
adsp_dbg(dsp, "Found '%s'\n", *wmfw_filename);
848846
wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename,
849847
cirrus_dir, NULL, NULL, "bin");
850848
return 0;

0 commit comments

Comments
 (0)