linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/tas2781: annotate calibration data endianness
@ 2024-01-08 21:16 Gergo Koteles
  2024-01-09 14:13 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Gergo Koteles @ 2024-01-08 21:16 UTC (permalink / raw)
  To: Shenghao Ding, Kevin Lu, Baojun Xu, Jaroslav Kysela, Takashi Iwai
  Cc: linux-kernel, alsa-devel, linux-sound, Gergo Koteles, kernel test robot

Sparse reports an endian mismatch.
The amplifier expects the calibration data as big-endian.
Use the __be32 type to express endianness better.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202401072137.Oc7pQgRW-lkp@intel.com/

Signed-off-by: Gergo Koteles <soyer@irl.hu>
---
 sound/pci/hda/tas2781_hda_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c
index 4805cf0b6480..2dd809de62e5 100644
--- a/sound/pci/hda/tas2781_hda_i2c.c
+++ b/sound/pci/hda/tas2781_hda_i2c.c
@@ -424,8 +424,8 @@ static const struct snd_kcontrol_new tas2781_dsp_conf_ctrl = {
 
 static void tas2563_apply_calib(struct tasdevice_priv *tas_priv)
 {
-	unsigned int data;
 	int offset = 0;
+	__be32 data;
 	int ret;
 
 	for (int i = 0; i < tas_priv->ndev; i++) {

base-commit: 736c40609d31481b3b2fffe8c239f2c86fb2b54c
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: hda/tas2781: annotate calibration data endianness
  2024-01-08 21:16 [PATCH] ALSA: hda/tas2781: annotate calibration data endianness Gergo Koteles
@ 2024-01-09 14:13 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2024-01-09 14:13 UTC (permalink / raw)
  To: Gergo Koteles
  Cc: Shenghao Ding, Kevin Lu, Baojun Xu, Jaroslav Kysela,
	Takashi Iwai, linux-kernel, alsa-devel, linux-sound,
	kernel test robot

On Mon, 08 Jan 2024 22:16:46 +0100,
Gergo Koteles wrote:
> 
> Sparse reports an endian mismatch.
> The amplifier expects the calibration data as big-endian.
> Use the __be32 type to express endianness better.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202401072137.Oc7pQgRW-lkp@intel.com/
> 
> Signed-off-by: Gergo Koteles <soyer@irl.hu>

Thanks, applied with the additional Fixes tag to the commit.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-09 14:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-08 21:16 [PATCH] ALSA: hda/tas2781: annotate calibration data endianness Gergo Koteles
2024-01-09 14:13 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).