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

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


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c6a6aac763aa320a3ed810041e0f1dc7ab77b30f

commit c6a6aac763aa320a3ed810041e0f1dc7ab77b30f
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