Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use DECLARE_FLEX_ARRAY() helper in include/uapi/sound/asoc.h #227

Closed
GustavoARSilva opened this issue Sep 26, 2022 · 0 comments
Closed

Use DECLARE_FLEX_ARRAY() helper in include/uapi/sound/asoc.h #227

GustavoARSilva opened this issue Sep 26, 2022 · 0 comments
Assignees
Labels
[Idiom] fake flexible array [Linux] -next Present in linux-next; expected for next Linux release [PATCH] Accepted A submitted patch has been accepted upstream [PATCH] Exists A patch exists to address the issue [Refactor] 0-element array Conversion away from zero-length array

Comments

@GustavoARSilva
Copy link
Collaborator

diff -u -p ./include/uapi/sound/asoc.h /tmp/nothing/include/uapi/sound/asoc.h
--- ./include/uapi/sound/asoc.h
+++ /tmp/nothing/include/uapi/sound/asoc.h
@@ -228,7 +228,6 @@ struct snd_soc_tplg_vendor_array {
        union {
                struct snd_soc_tplg_vendor_uuid_elem uuid[0];
                struct snd_soc_tplg_vendor_value_elem value[0];
-               struct snd_soc_tplg_vendor_string_elem string[0];
        };
 } __attribute__((packed));


@GustavoARSilva GustavoARSilva self-assigned this Sep 26, 2022
@GustavoARSilva GustavoARSilva added the [PATCH] Exists A patch exists to address the issue label Sep 26, 2022
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this issue Sep 27, 2022
…lper

Zero-length arrays are deprecated and we are moving towards adopting
C99 flexible-array members, instead. So, replace zero-length arrays
declarations in anonymous union with the new __DECLARE_FLEX_ARRAY()
helper macro.

This helper allows for flexible-array members in unions.

Link: KSPP#193
Link: KSPP#227
Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
jessfraz pushed a commit to jessfraz/linux that referenced this issue Mar 7, 2023
…lper

Zero-length arrays are deprecated and we are moving towards adopting
C99 flexible-array members, instead. So, replace zero-length arrays
declarations in anonymous union with the new __DECLARE_FLEX_ARRAY()
helper macro.

This helper allows for flexible-array members in unions.

Link: KSPP/linux#193
Link: KSPP/linux#227
Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
@GustavoARSilva GustavoARSilva added the [Linux] -next Present in linux-next; expected for next Linux release label Mar 8, 2023
@GustavoARSilva GustavoARSilva added the [PATCH] Accepted A submitted patch has been accepted upstream label May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Idiom] fake flexible array [Linux] -next Present in linux-next; expected for next Linux release [PATCH] Accepted A submitted patch has been accepted upstream [PATCH] Exists A patch exists to address the issue [Refactor] 0-element array Conversion away from zero-length array
Projects
None yet
Development

No branches or pull requests

1 participant