From: Takashi Iwai Subject: Re: [patch] ALSA: cs5535 - Fix an endianness conversion Date: Mon, 21 Nov 2011 12:39:53 +0100 Message-ID: References: <20111120205748.GA7354@elgon.mountain> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id BDBA52465B for ; Mon, 21 Nov 2011 12:39:53 +0100 (CET) In-Reply-To: <20111120205748.GA7354@elgon.mountain> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Dan Carpenter Cc: alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org, Jaya Kumar List-Id: alsa-devel@alsa-project.org At Sun, 20 Nov 2011 23:57:49 +0300, Dan Carpenter wrote: > > 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 > --- > This is a static checker bug. I haven't tested it. Obviously correct, so I applied it now. thanks, Takashi > 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; >