[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230605152855.448115-3-sbinding@opensource.cirrus.com>
Date: Mon, 5 Jun 2023 16:28:54 +0100
From: Stefan Binding <sbinding@...nsource.cirrus.com>
To: Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>
CC: <alsa-devel@...a-project.org>, <linux-kernel@...r.kernel.org>,
<patches@...nsource.cirrus.com>,
Stefan Binding <sbinding@...nsource.cirrus.com>
Subject: [PATCH v2 2/3] ALSA: hda: cs35l41: Fix endian conversions
Found during static analysis, ensure variables are correct
types before endian conversion.
Signed-off-by: Stefan Binding <sbinding@...nsource.cirrus.com>
---
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;
}
--
2.34.1
Powered by blists - more mailing lists