ALSA: oxfw: make read-only const array models static
Subsystems (3)
PATCH 1/1 ALSA: oxfw: make read-only const array models static
Don't populate the const array on the stack, instead make it static.
Signed-off-by Colin Ian King <[email protected]>
--- sound/firewire/oxfw/oxfw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/firewire/oxfw/oxfw.c +1 -1
@@ -44,7 +44,7 @@ struct compat_info {static bool detect_loud_models (struct fw_unit *unit) { -const char *const models[] = { +static const char *const models[] = {"Onyxi" ,"Onyx-i" ,"Onyx 1640i" ,
Signature · 1 line
2.39.2
Hi,
Quoted 22 lines · Colin Ian King
Don't populate the const array on the stack, instead make it static.
Signed-off-by Colin Ian King <[email protected]>--- sound/firewire/oxfw/oxfw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)sound/firewire/oxfw/oxfw.c +1
-1@@ -44,7 +44,7 @@ struct compat_info {static bool detect_loud_models (struct fw_unit *unit) { -const char *const models[] = { +static const char *const models[] = {"Onyxi" ,"Onyx-i" ,"Onyx 1640i" ,Signature · 1 line
2.39.2
Indeed. It is preferable.
Reviewed-by Takashi Sakamoto <[email protected]>
I found that ALSA fireface driver includes the similar issue. I'll send a patch to fix it later.
Thanks
Takashi Sakamoto
Takashi Iwai
AppliedQuoted 4 lines · Colin Ian King
Don't populate the const array on the stack, instead make it static.
Signed-off-by Colin Ian King <[email protected]>
Thanks, applied.
Takashi