From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jaya Kumar <jayakumar.alsa@gmail.com>
Cc: Takashi Iwai <tiwai@suse.de>,
alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org
Subject: [patch] ALSA: cs5535 - Fix an endianness conversion
Date: Sun, 20 Nov 2011 20:57:49 +0000 [thread overview]
Message-ID: <20111120205748.GA7354@elgon.mountain> (raw)
desc->size is supposed to be a le16 type. On a big endian system the
current code will set ->size to zero. We fixed a similar bug
on the next line but missed this one.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
This is a static checker bug. I haven't tested it.
diff --git a/sound/pci/cs5535audio/cs5535audio_pcm.c b/sound/pci/cs5535audio/cs5535audio_pcm.c
index e083122..dbf94b1 100644
--- a/sound/pci/cs5535audio/cs5535audio_pcm.c
+++ b/sound/pci/cs5535audio/cs5535audio_pcm.c
@@ -148,7 +148,7 @@ static int cs5535audio_build_dma_packets(struct cs5535audio *cs5535au,
struct cs5535audio_dma_desc *desc &((struct cs5535audio_dma_desc *) dma->desc_buf.area)[i];
desc->addr = cpu_to_le32(addr);
- desc->size = cpu_to_le32(period_bytes);
+ desc->size = cpu_to_le16(period_bytes);
desc->ctlreserved = cpu_to_le16(PRD_EOP);
desc_addr += sizeof(struct cs5535audio_dma_desc);
addr += period_bytes;
next reply other threads:[~2011-11-20 20:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-20 20:57 Dan Carpenter [this message]
2011-11-21 11:39 ` [patch] ALSA: cs5535 - Fix an endianness conversion Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111120205748.GA7354@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=alsa-devel@alsa-project.org \
--cc=jayakumar.alsa@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox