Commit 62286a08 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Kent Overstreet

bcachefs: Replace zero-length arrays with flexible-array members

Fake flexible arrays (zero-length and one-element arrays) are
deprecated, and should be replaced by flexible-array members.

So, replace zero-length arrays with flexible-array members
in multiple structures.
Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 8a4b4c52
......@@ -276,7 +276,7 @@ struct bch_ioctl_fs_usage {
__u32 replica_entries_bytes;
__u32 pad;
struct bch_replicas_usage replicas[0];
struct bch_replicas_usage replicas[];
};
/*
......@@ -313,7 +313,7 @@ struct bch_ioctl_dev_usage_v2 {
__u32 bucket_size;
__u64 nr_buckets;
struct bch_ioctl_dev_usage_type d[0];
struct bch_ioctl_dev_usage_type d[];
};
/*
......
......@@ -80,7 +80,7 @@ struct promote_op {
struct bpos pos;
struct data_update write;
struct bio_vec bi_inline_vecs[0]; /* must be last */
struct bio_vec bi_inline_vecs[]; /* must be last */
};
static const struct rhashtable_params bch_promote_params = {
......
......@@ -70,7 +70,7 @@ struct moving_io {
struct data_update write;
/* Must be last since it is variable size */
struct bio_vec bi_inline_vecs[0];
struct bio_vec bi_inline_vecs[];
};
static void move_free(struct moving_io *io)
......
......@@ -21,7 +21,7 @@ struct replicas_delta_list {
u64 nr_inodes;
u64 persistent_reserved[BCH_REPLICAS_MAX];
struct {} memset_end;
struct replicas_delta d[0];
struct replicas_delta d[];
};
#endif /* _BCACHEFS_REPLICAS_TYPES_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment