From patchwork Mon Mar 13 15:49:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 662699 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 17456C6FD19 for ; Mon, 13 Mar 2023 15:53:21 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EF14A1490; Mon, 13 Mar 2023 16:52:28 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EF14A1490 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678722799; bh=zFReu1nD3yGSXr605HnFCynTT8Xeza283PKgJONahCo=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From:Reply-To:Cc:From; b=E8hNAzeTFRtBfx9tmRxilzAS7jasqqU/9QpetO6q/QyeZ3bODlwYM9M8bUoL5WbUt Q5VedF/U1u1DXwC0OgcNVxO+mAgZNs0IZhcVrbpNdbPHeL3xreqAqGm1EOEjD/01do qkodoazfukxZtqEUgqF8cTqpW+PZLZMbxwna+GcI= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id B5483F804B1; Mon, 13 Mar 2023 16:52:07 +0100 (CET) To: , Subject: [PATCH v2 7/8] ASoC: wm_adsp: Simplify the logging of requested firmware files Date: Mon, 13 Mar 2023 15:49:54 +0000 In-Reply-To: <20230313154955.4268-1-rf@opensource.cirrus.com> References: <20230313154955.4268-1-rf@opensource.cirrus.com> X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <167872272713.26.2210648064927857232@mailman-core.alsa-project.org> X-Patchwork-Original-From: Richard Fitzgerald via Alsa-devel From: Richard Fitzgerald Reply-To: Richard Fitzgerald Cc: peter.ujfalusi@linux.intel.com, yung-chuan.liao@linux.intel.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, Simon Trimmer , Richard Fitzgerald Content-Disposition: inline From: Simon Trimmer 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 Signed-off-by: Richard Fitzgerald --- sound/soc/codecs/wm_adsp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index c23c306dc38d..216120b68b64 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -787,6 +787,8 @@ static int wm_adsp_request_firmware_file(struct wm_adsp *dsp, adsp_dbg(dsp, "Failed to request '%s'\n", *filename); kfree(*filename); *filename = NULL; + } else { + adsp_dbg(dsp, "Found '%s'\n", *filename); } return ret; @@ -807,7 +809,6 @@ static int wm_adsp_request_firmware_files(struct wm_adsp *dsp, if (!wm_adsp_request_firmware_file(dsp, wmfw_firmware, wmfw_filename, cirrus_dir, system_name, asoc_component_prefix, "wmfw")) { - adsp_dbg(dsp, "Found '%s'\n", *wmfw_filename); wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename, cirrus_dir, system_name, asoc_component_prefix, "bin"); @@ -819,7 +820,6 @@ static int wm_adsp_request_firmware_files(struct wm_adsp *dsp, if (!wm_adsp_request_firmware_file(dsp, wmfw_firmware, wmfw_filename, cirrus_dir, system_name, NULL, "wmfw")) { - adsp_dbg(dsp, "Found '%s'\n", *wmfw_filename); if (asoc_component_prefix) wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename, cirrus_dir, system_name, @@ -835,7 +835,6 @@ static int wm_adsp_request_firmware_files(struct wm_adsp *dsp, if (!wm_adsp_request_firmware_file(dsp, wmfw_firmware, wmfw_filename, "", NULL, NULL, "wmfw")) { - adsp_dbg(dsp, "Found '%s'\n", *wmfw_filename); wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename, "", NULL, NULL, "bin"); return 0; @@ -844,7 +843,6 @@ static int wm_adsp_request_firmware_files(struct wm_adsp *dsp, ret = wm_adsp_request_firmware_file(dsp, wmfw_firmware, wmfw_filename, cirrus_dir, NULL, NULL, "wmfw"); if (!ret) { - adsp_dbg(dsp, "Found '%s'\n", *wmfw_filename); wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename, cirrus_dir, NULL, NULL, "bin"); return 0;