ALSA: fireface: add field for the number of messages copied to user space
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Thu, 2 Feb 2023 13:37:08 +0000 (22:37 +0900)
committerTakashi Iwai <tiwai@suse.de>
Sat, 4 Feb 2023 08:35:17 +0000 (09:35 +0100)
commit0d9eb7ed958a71296c6829869f6304ddfdca64df
tree4d0edf9c83d12e2636af697b0ba85863f06a1daa
parentd045bceff5a904bd79d71dede9f927c00ce4906f
ALSA: fireface: add field for the number of messages copied to user space

Current structure includes no field to express the number of messages
copied to user space, thus user space application needs to information
out of the structure to parse the content of structure.

This commit adds a field to express the number of messages copied to user
space since It is more preferable to use self-contained structure.

Kees Cook proposed an idea of annotation for bound of flexible arrays
in his future improvement for flexible-length array in kernel. The
additional field for message count is suitable to the idea as well.

Reference: https://people.kernel.org/kees/bounded-flexible-arrays-in-c
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20230202133708.163936-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/uapi/sound/firewire.h
sound/firewire/fireface/ff-protocol-former.c