lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ff8d0da4-10f7-31a7-5cf9-7a4c0e009192@opensource.cirrus.com>
Date:   Mon, 5 Jun 2023 13:50:54 +0100
From:   Stefan Binding <sbinding@...nsource.cirrus.com>
To:     Takashi Iwai <tiwai@...e.de>
CC:     Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
        <alsa-devel@...a-project.org>, <linux-kernel@...r.kernel.org>,
        <patches@...nsource.cirrus.com>
Subject: Re: [PATCH RESEND v1 2/3] ALSA: hda: cs35l41: Fix endian conversions

Hi Takashi,

On 05/06/2023 08:21, Takashi Iwai wrote:
> On Thu, 25 May 2023 15:59:54 +0200,
> Stefan Binding wrote:
>> @@ -379,10 +379,10 @@ static int cs35l41_save_calibration(struct cs35l41_hda *cs35l41)
>>   
>>   				/* Calibration can only be applied whilst the DSP is not running */
>>   				ret = cs35l41_apply_calibration(cs35l41,
>> -								cpu_to_be32(cl->calAmbient),
>> -								cpu_to_be32(cl->calR),
>> -								cpu_to_be32(cl->calStatus),
>> -								cpu_to_be32(cl->calR + 1));
>> +								(__be32)cpu_to_be32(cl->calAmbient),
>> +								(__be32)cpu_to_be32(cl->calR),
>> +								(__be32)cpu_to_be32(cl->calStatus),
>> +								(__be32)cpu_to_be32(cl->calR + 1));
> Do we really need those cast?  Even if yes, it must be with __force
> prefix for the endian cast in general.

These casts were added because we found some warnings when we ran the 
static analyzer sparse locally.
I think these warnings are very minor, and we can drop this patch if you 
prefer?

Thanks,

Stefan

>
> thanks,
>
> Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ