Skip to content

Commit

Permalink
Merge tag 'flex-array-transformations-6.4-rc1' of git://git.kernel.or…
Browse files Browse the repository at this point in the history
…g/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
  • Loading branch information
torvalds committed Apr 26, 2023
2 parents 0cfd870 + 00168b4 commit 98f99e6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/vmwgfx/vmwgfx_so.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ struct vmw_view {
unsigned view_id; /* Immutable */
u32 cmd_size; /* Immutable */
bool committed; /* Protected by binding_mutex */
u32 cmd[1]; /* Immutable */
u32 cmd[]; /* Immutable */
};

static int vmw_view_create(struct vmw_resource *res);
Expand Down
2 changes: 1 addition & 1 deletion include/uapi/linux/ipv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ struct ipv6_opt_hdr {
struct rt0_hdr {
struct ipv6_rt_hdr rt_hdr;
__u32 reserved;
struct in6_addr addr[0];
struct in6_addr addr[];

#define rt0_type rt_hdr.type
};
Expand Down
6 changes: 3 additions & 3 deletions include/uapi/sound/asoc.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,9 @@ struct snd_soc_tplg_vendor_array {
__le32 type; /* SND_SOC_TPLG_TUPLE_TYPE_ */
__le32 num_elems; /* number of elements in array */
union {
struct snd_soc_tplg_vendor_uuid_elem uuid[0];
struct snd_soc_tplg_vendor_value_elem value[0];
struct snd_soc_tplg_vendor_string_elem string[0];
__DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_uuid_elem, uuid);
__DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_value_elem, value);
__DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_string_elem, string);
};
} __attribute__((packed));

Expand Down

0 comments on commit 98f99e6

Please sign in to comment.