Merge tag 'flexible-array-transformations-UAPI-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux
Pull uapi flexible array update from Gustavo Silva:
"A treewide patch that replaces zero-length arrays with flexible-array
members in UAPI. This has been baking in linux-next for 5 weeks now.
'-fstrict-flex-arrays=3' is coming and we need to land these changes
to prevent issues like these in the short future:
fs/minix/dir.c:337:3: warning: 'strcpy' will always overflow; destination buffer has size 0, but the source string has length 2 (including NUL byte) [-Wfortify-source]
strcpy(de3->name, ".");
^
Since these are all [0] to [] changes, the risk to UAPI is nearly
zero. If this breaks anything, we can use a union with a new member
name"
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836
* tag 'flexible-array-transformations-UAPI-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux:
treewide: uapi: Replace zero-length arrays with flexible-array members
This commit is contained in:
@@ -2123,7 +2123,7 @@ struct i915_context_engines_load_balance {
|
||||
|
||||
__u64 mbz64; /* reserved for future use; must be zero */
|
||||
|
||||
struct i915_engine_class_instance engines[0];
|
||||
struct i915_engine_class_instance engines[];
|
||||
} __attribute__((packed));
|
||||
|
||||
#define I915_DEFINE_CONTEXT_ENGINES_LOAD_BALANCE(name__, N__) struct { \
|
||||
@@ -2161,7 +2161,7 @@ struct i915_context_engines_bond {
|
||||
__u64 flags; /* all undefined flags must be zero */
|
||||
__u64 mbz64[4]; /* reserved for future use; must be zero */
|
||||
|
||||
struct i915_engine_class_instance engines[0];
|
||||
struct i915_engine_class_instance engines[];
|
||||
} __attribute__((packed));
|
||||
|
||||
#define I915_DEFINE_CONTEXT_ENGINES_BOND(name__, N__) struct { \
|
||||
@@ -2288,7 +2288,7 @@ struct i915_context_engines_parallel_submit {
|
||||
* length = width (i) * num_siblings (j)
|
||||
* index = j + i * num_siblings
|
||||
*/
|
||||
struct i915_engine_class_instance engines[0];
|
||||
struct i915_engine_class_instance engines[];
|
||||
|
||||
} __packed;
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ struct file_dedupe_range {
|
||||
__u16 dest_count; /* in - total elements in info array */
|
||||
__u16 reserved1; /* must be zero */
|
||||
__u32 reserved2; /* must be zero */
|
||||
struct file_dedupe_range_info info[0];
|
||||
struct file_dedupe_range_info info[];
|
||||
};
|
||||
|
||||
/* And dynamically-tunable limits and defaults: */
|
||||
|
||||
@@ -108,7 +108,7 @@ struct tun_pi {
|
||||
struct tun_filter {
|
||||
__u16 flags; /* TUN_FLT_ flags see above */
|
||||
__u16 count; /* Number of addresses */
|
||||
__u8 addr[0][ETH_ALEN];
|
||||
__u8 addr[][ETH_ALEN];
|
||||
};
|
||||
|
||||
#endif /* _UAPI__IF_TUN_H */
|
||||
|
||||
@@ -542,7 +542,7 @@ struct kvm_coalesced_mmio {
|
||||
|
||||
struct kvm_coalesced_mmio_ring {
|
||||
__u32 first, last;
|
||||
struct kvm_coalesced_mmio coalesced_mmio[0];
|
||||
struct kvm_coalesced_mmio coalesced_mmio[];
|
||||
};
|
||||
|
||||
#define KVM_COALESCED_MMIO_MAX \
|
||||
@@ -621,7 +621,7 @@ struct kvm_clear_dirty_log {
|
||||
/* for KVM_SET_SIGNAL_MASK */
|
||||
struct kvm_signal_mask {
|
||||
__u32 len;
|
||||
__u8 sigset[0];
|
||||
__u8 sigset[];
|
||||
};
|
||||
|
||||
/* for KVM_TPR_ACCESS_REPORTING */
|
||||
@@ -1221,7 +1221,7 @@ struct kvm_irq_routing_entry {
|
||||
struct kvm_irq_routing {
|
||||
__u32 nr;
|
||||
__u32 flags;
|
||||
struct kvm_irq_routing_entry entries[0];
|
||||
struct kvm_irq_routing_entry entries[];
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1341,7 +1341,7 @@ struct kvm_dirty_tlb {
|
||||
|
||||
struct kvm_reg_list {
|
||||
__u64 n; /* number of regs */
|
||||
__u64 reg[0];
|
||||
__u64 reg[];
|
||||
};
|
||||
|
||||
struct kvm_one_reg {
|
||||
|
||||
@@ -491,7 +491,7 @@ struct perf_event_query_bpf {
|
||||
/*
|
||||
* User provided buffer to store program ids
|
||||
*/
|
||||
__u32 ids[0];
|
||||
__u32 ids[];
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -180,7 +180,7 @@ struct tc_u32_sel {
|
||||
|
||||
short hoff;
|
||||
__be32 hmask;
|
||||
struct tc_u32_key keys[0];
|
||||
struct tc_u32_key keys[];
|
||||
};
|
||||
|
||||
struct tc_u32_mark {
|
||||
@@ -192,7 +192,7 @@ struct tc_u32_mark {
|
||||
struct tc_u32_pcnt {
|
||||
__u64 rcnt;
|
||||
__u64 rhit;
|
||||
__u64 kcnts[0];
|
||||
__u64 kcnts[];
|
||||
};
|
||||
|
||||
/* Flags */
|
||||
|
||||
@@ -30,7 +30,7 @@ struct ipv6_sr_hdr {
|
||||
__u8 flags;
|
||||
__u16 tag;
|
||||
|
||||
struct in6_addr segments[0];
|
||||
struct in6_addr segments[];
|
||||
};
|
||||
|
||||
#define SR6_FLAG1_PROTECTED (1 << 6)
|
||||
@@ -49,7 +49,7 @@ struct ipv6_sr_hdr {
|
||||
struct sr6_tlv {
|
||||
__u8 type;
|
||||
__u8 len;
|
||||
__u8 data[0];
|
||||
__u8 data[];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -131,7 +131,7 @@ struct usbdevfs_urb {
|
||||
unsigned int signr; /* signal to be sent on completion,
|
||||
or 0 if none should be sent. */
|
||||
void __user *usercontext;
|
||||
struct usbdevfs_iso_packet_desc iso_frame_desc[0];
|
||||
struct usbdevfs_iso_packet_desc iso_frame_desc[];
|
||||
};
|
||||
|
||||
/* ioctls for talking directly to drivers */
|
||||
@@ -176,7 +176,7 @@ struct usbdevfs_disconnect_claim {
|
||||
struct usbdevfs_streams {
|
||||
unsigned int num_streams; /* Not used by USBDEVFS_FREE_STREAMS */
|
||||
unsigned int num_eps;
|
||||
unsigned char eps[0];
|
||||
unsigned char eps[];
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -1106,7 +1106,7 @@ struct snd_ctl_elem_value {
|
||||
struct snd_ctl_tlv {
|
||||
unsigned int numid; /* control element numeric identification */
|
||||
unsigned int length; /* in bytes aligned to 4 */
|
||||
unsigned int tlv[0]; /* first TLV */
|
||||
unsigned int tlv[]; /* first TLV */
|
||||
};
|
||||
|
||||
#define SNDRV_CTL_IOCTL_PVERSION _IOR('U', 0x00, int)
|
||||
|
||||
Reference in New Issue
Block a user