From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Arnd Bergmann <arnd@arndb.de>,
Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: ALSA Development Mailing List <alsa-devel@alsa-project.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Takashi Iwai <tiwai@suse.com>,
Liam Girdwood <liam.r.girdwood@linux.intel.com>,
Mark Brown <broonie@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [alsa-devel] [PATCH] ASoC: SOF: use __u32 instead of uint32_t in uapi headers
Date: Mon, 22 Jul 2019 10:19:53 -0500 [thread overview]
Message-ID: <fdd24e93-efad-0132-e1ff-b7f5f87e8efc@linux.intel.com> (raw)
In-Reply-To: <CAK8P3a01MzCTJnk_fuMgWsRBa3u_CEZegZqH37G7qLiquHWncA@mail.gmail.com>
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.
prev parent reply other threads:[~2019-07-22 15:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-21 14:23 [PATCH] ASoC: SOF: use __u32 instead of uint32_t in uapi headers Masahiro Yamada
2019-07-22 12:22 ` Applied "ASoC: SOF: use __u32 instead of uint32_t in uapi headers" to the asoc tree Mark Brown
2019-07-22 12:49 ` [alsa-devel] [PATCH] ASoC: SOF: use __u32 instead of uint32_t in uapi headers Pierre-Louis Bossart
2019-07-22 12:56 ` Takashi Iwai
2019-07-22 13:16 ` Pierre-Louis Bossart
2019-07-22 13:34 ` Arnd Bergmann
2019-07-22 15:18 ` Pierre-Louis Bossart
2019-07-22 15:21 ` Arnd Bergmann
2019-07-22 13:39 ` Arnd Bergmann
2019-07-22 14:35 ` Masahiro Yamada
2019-07-22 15:19 ` Pierre-Louis Bossart [this message]
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=fdd24e93-efad-0132-e1ff-b7f5f87e8efc@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tiwai@suse.com \
--cc=yamada.masahiro@socionext.com \
/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