Skip to content

Commit 472a2ab

Browse files
committed
Merge tag 'flex-array-transformations-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux
Pull flexible-array updates from Gustavo Silva: "Transform zero-length arrays, in unions, into flexible arrays" * tag 'flex-array-transformations-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: bcache: Replace zero-length arrays with DECLARE_FLEX_ARRAY() helper mm/memremap: Replace zero-length array with DECLARE_FLEX_ARRAY() helper exportfs: Replace zero-length array with DECLARE_FLEX_ARRAY() helper
2 parents e534a58 + b942a52 commit 472a2ab

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

drivers/md/bcache/bcache_ondisk.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,8 @@ struct jset {
360360
__u64 prio_bucket[MAX_CACHES_PER_SET];
361361

362362
union {
363-
struct bkey start[0];
364-
__u64 d[0];
363+
DECLARE_FLEX_ARRAY(struct bkey, start);
364+
DECLARE_FLEX_ARRAY(__u64, d);
365365
};
366366
};
367367

@@ -425,8 +425,8 @@ struct bset {
425425
__u32 keys;
426426

427427
union {
428-
struct bkey start[0];
429-
__u64 d[0];
428+
DECLARE_FLEX_ARRAY(struct bkey, start);
429+
DECLARE_FLEX_ARRAY(__u64, d);
430430
};
431431
};
432432

include/linux/exportfs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ struct fid {
131131
u32 parent_block;
132132
u32 parent_generation;
133133
} udf;
134-
__u32 raw[0];
134+
DECLARE_FLEX_ARRAY(__u32, raw);
135135
};
136136
};
137137

include/linux/memremap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ struct dev_pagemap {
135135
int nr_range;
136136
union {
137137
struct range range;
138-
struct range ranges[0];
138+
DECLARE_FLEX_ARRAY(struct range, ranges);
139139
};
140140
};
141141

0 commit comments

Comments
 (0)