From patchwork Tue Jun 6 10:34:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Binding X-Patchwork-Id: 689769 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 20B7DC77B7A for ; Tue, 6 Jun 2023 10:37:13 +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 9854A836; Tue, 6 Jun 2023 12:36:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9854A836 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1686047830; bh=UruFh6U7bhpdZyDxBIlHCtnZk2zvtnd0T9fe9urbU2s=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=QonzMX9+ZfmbaYVvH16GueLUGsg8rHu3dKmULYswkRU3GUfc46iCT0IasPI8wS2oH ajItzJv4FOaAuIpHd295MAAoo1EY1F8bKcmKwAuEnCUhwfIMLEkDqZajfUZVeJB+yW Ncn7cuXlBc5tvzUwWmV81QCrZ9ZpqsWFKvDjQ5MY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5A28EF80567; Tue, 6 Jun 2023 12:35:16 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 9FFEFF80199; Tue, 6 Jun 2023 12:35:15 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A8557F80580; Tue, 6 Jun 2023 12:35:12 +0200 (CEST) Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7A8FAF80199 for ; Tue, 6 Jun 2023 12:34:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7A8FAF80199 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=lPERgH4V Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3565N8jJ006095; Tue, 6 Jun 2023 05:34:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=eYBg8d8Hvj15ndjFUQ9ONSXAzqhuPZlCNKFw2fRkfqM=; b=lPERgH4VbDVJISBOYuuiYc/9MyB5ccv1+/2EAhdlbAsQJF4VYx2k3PV7Dq0dGQwsquwL AB1xxFkf7mPCW0+06S6t+Oh78ra9o1FZ3KsCkqNW2OH8rlSjVuX0v3dLcGI7HfKHr7vQ znLBodm7StYHJK+brz4Si2gLmybr6jLuSNeq1dk71SWb4sPnrv1AjkJ9pYVTjpMRzF6n Un/Chte2EQvQ+GJADiZpio55iyMvzizJ/0F3vHm62UXpoAE52viM07NZpn4C0EiJwPkt 6WgB6ixA9g/TtFA0ZwVBTwBOutIrWag0oedO30kNT4aO3kwy1LfcIouoD1FCd/aVhxQx cw== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3r02x1asf3-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Jun 2023 05:34:46 -0500 Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Tue, 6 Jun 2023 11:34:44 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Tue, 6 Jun 2023 11:34:44 +0100 Received: from sbinding-cirrus-dsktp2.ad.cirrus.com (unknown [198.90.238.36]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 2DB09B2F; Tue, 6 Jun 2023 10:34:44 +0000 (UTC) From: Stefan Binding To: Jaroslav Kysela , Takashi Iwai CC: , , , Stefan Binding Subject: [PATCH v3 2/3] ALSA: hda: cs35l41: Fix endian conversions Date: Tue, 6 Jun 2023 11:34:35 +0100 Message-ID: <20230606103436.455348-3-sbinding@opensource.cirrus.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230606103436.455348-1-sbinding@opensource.cirrus.com> References: <20230606103436.455348-1-sbinding@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: pGAQLpAMfUUpUum8VCGzvu5H1KEWN9ym X-Proofpoint-GUID: pGAQLpAMfUUpUum8VCGzvu5H1KEWN9ym X-Proofpoint-Spam-Reason: safe Message-ID-Hash: F5UIXGO4CNI27ONZDJQTDJ3DC63SSWO4 X-Message-ID-Hash: F5UIXGO4CNI27ONZDJQTDJ3DC63SSWO4 X-MailFrom: prvs=15210a2e6b=sbinding@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: Found during static analysis, ensure variables are correct types before endian conversion. Signed-off-by: Stefan Binding --- sound/pci/hda/cs35l41_hda.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c index d100189e15b83..ce5faa6205170 100644 --- a/sound/pci/hda/cs35l41_hda.c +++ b/sound/pci/hda/cs35l41_hda.c @@ -308,8 +308,8 @@ static int cs35l41_request_firmware_files(struct cs35l41_hda *cs35l41, } #if IS_ENABLED(CONFIG_EFI) -static int cs35l41_apply_calibration(struct cs35l41_hda *cs35l41, unsigned int ambient, - unsigned int r0, unsigned int status, unsigned int checksum) +static int cs35l41_apply_calibration(struct cs35l41_hda *cs35l41, __be32 ambient, __be32 r0, + __be32 status, __be32 checksum) { int ret; @@ -745,7 +745,7 @@ static int cs35l41_runtime_resume(struct device *dev) static int cs35l41_smart_amp(struct cs35l41_hda *cs35l41) { - int halo_sts; + __be32 halo_sts; int ret; ret = cs35l41_init_dsp(cs35l41); @@ -773,7 +773,7 @@ static int cs35l41_smart_amp(struct cs35l41_hda *cs35l41) &halo_sts, sizeof(halo_sts)); if (ret) { - dev_err(cs35l41->dev, "Timeout waiting for HALO Core to start. State: %d\n", + dev_err(cs35l41->dev, "Timeout waiting for HALO Core to start. State: %u\n", halo_sts); goto clean_dsp; }