Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'flex-array-transformations-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux

Pull flexible-array updates from Gustavo Silva:
"Transform more zero-length and one-element arrays into C99
flexible-array members"

* tag 'flex-array-transformations-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux:
uapi: net: ipv6: Replace fake flex-array with flex-array member
drm/vmwgfx: Replace one-element array with flexible-array member
ASoC: uapi: Replace zero-length arrays with __DECLARE_FLEX_ARRAY() helper

+5 -5
+1 -1
drivers/gpu/drm/vmwgfx/vmwgfx_so.c
··· 71 71 unsigned view_id; /* Immutable */ 72 72 u32 cmd_size; /* Immutable */ 73 73 bool committed; /* Protected by binding_mutex */ 74 - u32 cmd[1]; /* Immutable */ 74 + u32 cmd[]; /* Immutable */ 75 75 }; 76 76 77 77 static int vmw_view_create(struct vmw_resource *res);
+1 -1
include/uapi/linux/ipv6.h
··· 81 81 struct rt0_hdr { 82 82 struct ipv6_rt_hdr rt_hdr; 83 83 __u32 reserved; 84 - struct in6_addr addr[0]; 84 + struct in6_addr addr[]; 85 85 86 86 #define rt0_type rt_hdr.type 87 87 };
+3 -3
include/uapi/sound/asoc.h
··· 222 222 __le32 type; /* SND_SOC_TPLG_TUPLE_TYPE_ */ 223 223 __le32 num_elems; /* number of elements in array */ 224 224 union { 225 - struct snd_soc_tplg_vendor_uuid_elem uuid[0]; 226 - struct snd_soc_tplg_vendor_value_elem value[0]; 227 - struct snd_soc_tplg_vendor_string_elem string[0]; 225 + __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_uuid_elem, uuid); 226 + __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_value_elem, value); 227 + __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_string_elem, string); 228 228 }; 229 229 } __attribute__((packed)); 230 230