[openwrt/openwrt] gpio-button-hotplug: use flexible array member

LEDE Commits lede-commits at lists.infradead.org
Mon Nov 4 01:51:15 PST 2024


robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/547feaca2ca7a8d1f81757d6905da3da127139d9

commit 547feaca2ca7a8d1f81757d6905da3da127139d9
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Fri Aug 2 14:30:32 2024 -0700

    gpio-button-hotplug: use flexible array member
    
    zero length arrays are deprecated.
    
    Fixes coccinelle warning:
    
    WARNING use flexible-array member instead
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/16848
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
index 1dd0ff2a1a..52346c25d9 100644
--- a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
+++ b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
@@ -302,7 +302,7 @@ struct gpio_keys_button_dev {
 
 	struct device *dev;
 	struct gpio_keys_platform_data *pdata;
-	struct gpio_keys_button_data data[0];
+	struct gpio_keys_button_data data[];
 };
 
 static void gpio_keys_polled_queue_work(struct gpio_keys_button_dev *bdev)




More information about the lede-commits mailing list