Skip to content

Commit 98f99e6

Browse files
committed
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
2 parents 0cfd870 + 00168b4 commit 98f99e6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

drivers/gpu/drm/vmwgfx/vmwgfx_so.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ struct vmw_view {
7171
unsigned view_id; /* Immutable */
7272
u32 cmd_size; /* Immutable */
7373
bool committed; /* Protected by binding_mutex */
74-
u32 cmd[1]; /* Immutable */
74+
u32 cmd[]; /* Immutable */
7575
};
7676

7777
static int vmw_view_create(struct vmw_resource *res);

include/uapi/linux/ipv6.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ struct ipv6_opt_hdr {
8181
struct rt0_hdr {
8282
struct ipv6_rt_hdr rt_hdr;
8383
__u32 reserved;
84-
struct in6_addr addr[0];
84+
struct in6_addr addr[];
8585

8686
#define rt0_type rt_hdr.type
8787
};

include/uapi/sound/asoc.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,9 @@ struct snd_soc_tplg_vendor_array {
222222
__le32 type; /* SND_SOC_TPLG_TUPLE_TYPE_ */
223223
__le32 num_elems; /* number of elements in array */
224224
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);
228228
};
229229
} __attribute__((packed));
230230

0 commit comments

Comments
 (0)