Skip to contentSkip to conversation

misc: bcm-vk: avoid -Wflex-array-member-not-at-end warning

PATCH In review Gustavo A. R. Silva 3 participants 3 messages Mar 13, 2025 – Mar 14, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 misc: bcm-vk: avoid -Wflex-array-member-not-at-end warning

Fix the following warning by removing unused flex-array member data in struct bcm_vk_peer_log:

drivers/misc/bcm-vk/bcm_vk.h:415:32: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]

---
 drivers/misc/bcm-vk/bcm_vk.h | 1 -
 1 file changed, 1 deletion(-)
drivers/misc/bcm-vk/bcm_vk.h +0 -1
index 386884c2a263..9344c2366a4b 100644
@@ -311,7 +311,6 @@ struct bcm_vk_peer_log {
 	u32 wr_idx;
 	u32 buf_size;
 	u32 mask;
-	char data[];
 };
 
 /* max buf size allowed */
Signature · 1 line
2.43.0
maintainer Acked-by on v1 1/1
#1 lore raw

looks fine

Quoted 6 lines · Gustavo A. R. Silva

Fix the following warning by removing unused flex-array member data in struct bcm_vk_peer_log:

drivers/misc/bcm-vk/bcm_vk.h:415:32: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]

Quoted 16 lines
---
  drivers/misc/bcm-vk/bcm_vk.h | 1 -
  1 file changed, 1 deletion(-)
drivers/misc/bcm-vk/bcm_vk.h +0 -1
index 386884c2a263..9344c2366a4b 100644
@@ -311,7 +311,6 @@ struct bcm_vk_peer_log {
  	u32 wr_idx;
  	u32 buf_size;
  	u32 mask;
-	char data[];
  };
 
  /* max buf size allowed */
#2 lore raw
Quoted 10 lines · Scott Branden

looks fine

Quoted 6 lines · Gustavo A. R. Silva

Fix the following warning by removing unused flex-array member data in struct bcm_vk_peer_log:

drivers/misc/bcm-vk/bcm_vk.h:415:32: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at- end]

Thanks! :)

--
Gustavo