lkml.org 
[lkml]   [2019]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [alsa-devel] [PATCH] ASoC: SOF: use __u32 instead of uint32_t in uapi headers
From
Date


On 7/22/19 8:39 AM, Arnd Bergmann wrote:
> On Sun, Jul 21, 2019 at 4:25 PM Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
>>
>> struct snd_sof_blk_hdr {
>> enum snd_sof_fw_blk_type type;
>> - uint32_t size; /* bytes minus this header */
>> - uint32_t offset; /* offset from base */
>> + __u32 size; /* bytes minus this header */
>> + __u32 offset; /* offset from base */
>> } __packed;
>>
>
> On a related note: Using an 'enum' in an ABI structure is not portable
> across architectures. This is probably fine in a UAPI as long as user
> and kernel space agree on the size of an enum, but if the same
> structure is used to talk to the firmware, it won't work on architectures
> that have a different size for the first field.

yes, we've removed all enums in SOF and missed this one. This should be
changed, thanks for the note.

\
 
 \ /
  Last update: 2019-07-22 17:30    [W:0.098 / U:6.960 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site