mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-19 04:14:49 +08:00
flexible-array member conversion patches for 5.10-rc2
Hi Linus, Please, pull the following patches that replace zero-length arrays with flexible-array members. Thanks -- Gustavo -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEkmRahXBSurMIg1YvRwW0y0cG2zEFAl+cjRUACgkQRwW0y0cG 2zGWAhAAjUfTsAmXWhKNaWFSCYR0Q822puTUWOKfiBd+jjGaO04luTtr2gjv2Dkb Vgad8H4N8oZU79xfh5JZ5PUyScaso8wE6ZJTh2PLKXpKmNd213f5x/pIt78CCDTa Y1L/eR41mmveTL3VNS3sf6WaZpT9owxJKGIY8JgdiOmSjxJQpX5zdaC1KYso4eXr lIXIRo9VLEmVLhhHhZi+QmX6+aQ05E1D9K0ENe4/uEnRsV525W78iwZ4fYeLzr+A krEOdgx6sPgzajPYnHoayrrcKNKxD5YY1SWuVSm2tqYYIhlRoK3f5xgLOd10RiHE YMgx8aWzGmGJwoUhgp1bo/l9EZ7O8OWRqM/GOP4x6Wgjdhqw2x5jgskmhsKNGEXu /BlbS+qL5aUrMCxhvNbApuZW6xBiBbva76MH3vU9vFhZbVz1CHLQdGI0tfxggYWS jc2UPgoxL9OQlf3jSc+gK7RMFhBGNWn2Aiy8GQas3BxPYXuYPvwOj+irDOG/qZ9D VZ5swUw4+th+DsF5K53mEFeLv0fONMgL9Ka5bNR6+k6HG0WNLYYVOiet3xYUDo1f eZbMZthfc+QW7R8cwG0WuFk6rC6mLqE+A9nQuLZoJD+VMuJd4pwW9+6EW8nDX08w FS4/o92xUFJfOCgaLRS61FSAuSmFENieN+yoKMK/Uf6PJVdNMb4= =vyu3 -----END PGP SIGNATURE----- Merge tag 'flexible-array-conversions-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull more flexible-array member conversions from Gustavo A. R. Silva: "Replace zero-length arrays with flexible-array members" * tag 'flexible-array-conversions-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: printk: ringbuffer: Replace zero-length array with flexible-array member net/smc: Replace zero-length array with flexible-array member net/mlx5: Replace zero-length array with flexible-array member mei: hw: Replace zero-length array with flexible-array member gve: Replace zero-length array with flexible-array member Bluetooth: btintel: Replace zero-length array with flexible-array member scsi: target: tcmu: Replace zero-length array with flexible-array member ima: Replace zero-length array with flexible-array member enetc: Replace zero-length array with flexible-array member fs: Replace zero-length array with flexible-array member Bluetooth: Replace zero-length array with flexible-array member params: Replace zero-length array with flexible-array member tracepoint: Replace zero-length array with flexible-array member platform/chrome: cros_ec_proto: Replace zero-length array with flexible-array member platform/chrome: cros_ec_commands: Replace zero-length array with flexible-array member mailbox: zynqmp-ipi-message: Replace zero-length array with flexible-array member dmaengine: ti-cppi5: Replace zero-length array with flexible-array member
This commit is contained in:
commit
53760f9b74
@ -47,7 +47,7 @@ enum {
|
||||
struct intel_tlv {
|
||||
u8 type;
|
||||
u8 len;
|
||||
u8 val[0];
|
||||
u8 val[];
|
||||
} __packed;
|
||||
|
||||
struct intel_version_tlv {
|
||||
|
@ -224,7 +224,7 @@ struct mei_ext_hdr {
|
||||
u8 type;
|
||||
u8 length;
|
||||
u8 ext_payload[2];
|
||||
u8 hdr[0];
|
||||
u8 hdr[];
|
||||
};
|
||||
|
||||
/**
|
||||
@ -238,7 +238,7 @@ struct mei_ext_meta_hdr {
|
||||
u8 count;
|
||||
u8 size;
|
||||
u8 reserved[2];
|
||||
struct mei_ext_hdr hdrs[0];
|
||||
struct mei_ext_hdr hdrs[];
|
||||
};
|
||||
|
||||
/*
|
||||
@ -308,7 +308,7 @@ struct mei_msg_hdr {
|
||||
u32 dma_ring:1;
|
||||
u32 internal:1;
|
||||
u32 msg_complete:1;
|
||||
u32 extension[0];
|
||||
u32 extension[];
|
||||
} __packed;
|
||||
|
||||
/* The length is up to 9 bits */
|
||||
|
@ -402,7 +402,7 @@ struct enetc_psfp_gate {
|
||||
u32 num_entries;
|
||||
refcount_t refcount;
|
||||
struct hlist_node node;
|
||||
struct action_gate_entry entries[0];
|
||||
struct action_gate_entry entries[];
|
||||
};
|
||||
|
||||
/* Only enable the green color frame now
|
||||
|
@ -198,7 +198,7 @@ static_assert(sizeof(struct stats) == 16);
|
||||
|
||||
struct gve_stats_report {
|
||||
__be64 written_count;
|
||||
struct stats stats[0];
|
||||
struct stats stats[];
|
||||
};
|
||||
|
||||
static_assert(sizeof(struct gve_stats_report) == 8);
|
||||
|
@ -116,9 +116,8 @@ static int gve_alloc_stats_report(struct gve_priv *priv)
|
||||
priv->tx_cfg.num_queues;
|
||||
rx_stats_num = (GVE_RX_STATS_REPORT_NUM + NIC_RX_STATS_REPORT_NUM) *
|
||||
priv->rx_cfg.num_queues;
|
||||
priv->stats_report_len = sizeof(struct gve_stats_report) +
|
||||
(tx_stats_num + rx_stats_num) *
|
||||
sizeof(struct stats);
|
||||
priv->stats_report_len = struct_size(priv->stats_report, stats,
|
||||
tx_stats_num + rx_stats_num);
|
||||
priv->stats_report =
|
||||
dma_alloc_coherent(&priv->pdev->dev, priv->stats_report_len,
|
||||
&priv->stats_report_bus, GFP_KERNEL);
|
||||
|
@ -194,7 +194,7 @@ struct tcmu_tmr {
|
||||
|
||||
uint8_t tmr_type;
|
||||
uint32_t tmr_cmd_cnt;
|
||||
int16_t tmr_cmd_ids[0];
|
||||
int16_t tmr_cmd_ids[];
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -1690,7 +1690,7 @@ struct elf_thread_core_info {
|
||||
struct elf_thread_core_info *next;
|
||||
struct task_struct *task;
|
||||
struct elf_prstatus prstatus;
|
||||
struct memelfnote notes[0];
|
||||
struct memelfnote notes[];
|
||||
};
|
||||
|
||||
struct elf_note_info {
|
||||
|
@ -60,7 +60,7 @@ struct hfs_bnode {
|
||||
wait_queue_head_t lock_wq;
|
||||
atomic_t refcnt;
|
||||
unsigned int page_offset;
|
||||
struct page *page[0];
|
||||
struct page *page[];
|
||||
};
|
||||
|
||||
#define HFS_BNODE_ERROR 0
|
||||
|
@ -117,7 +117,7 @@ struct hfs_bnode {
|
||||
wait_queue_head_t lock_wq;
|
||||
atomic_t refcnt;
|
||||
unsigned int page_offset;
|
||||
struct page *page[0];
|
||||
struct page *page[];
|
||||
};
|
||||
|
||||
#define HFS_BNODE_LOCK 0
|
||||
|
@ -22,7 +22,7 @@ struct SU_ER_s {
|
||||
__u8 len_des;
|
||||
__u8 len_src;
|
||||
__u8 ext_ver;
|
||||
__u8 data[0];
|
||||
__u8 data[];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct RR_RR_s {
|
||||
@ -44,7 +44,7 @@ struct RR_PN_s {
|
||||
struct SL_component {
|
||||
__u8 flags;
|
||||
__u8 len;
|
||||
__u8 text[0];
|
||||
__u8 text[];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct RR_SL_s {
|
||||
@ -54,7 +54,7 @@ struct RR_SL_s {
|
||||
|
||||
struct RR_NM_s {
|
||||
__u8 flags;
|
||||
char name[0];
|
||||
char name[];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct RR_CL_s {
|
||||
@ -71,7 +71,7 @@ struct stamp {
|
||||
|
||||
struct RR_TF_s {
|
||||
__u8 flags;
|
||||
struct stamp times[0]; /* Variable number of these beasts */
|
||||
struct stamp times[]; /* Variable number of these beasts */
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* Linux-specific extension for transparent decompression */
|
||||
|
@ -97,7 +97,7 @@ u64 select_estimate_accuracy(struct timespec64 *tv)
|
||||
struct poll_table_page {
|
||||
struct poll_table_page * next;
|
||||
struct poll_table_entry * entry;
|
||||
struct poll_table_entry entries[0];
|
||||
struct poll_table_entry entries[];
|
||||
};
|
||||
|
||||
#define POLL_TABLE_FULL(table) \
|
||||
@ -836,7 +836,7 @@ SYSCALL_DEFINE1(old_select, struct sel_arg_struct __user *, arg)
|
||||
struct poll_list {
|
||||
struct poll_list *next;
|
||||
int len;
|
||||
struct pollfd entries[0];
|
||||
struct pollfd entries[];
|
||||
};
|
||||
|
||||
#define POLLFD_PER_PAGE ((PAGE_SIZE-sizeof(struct poll_list)) / sizeof(struct pollfd))
|
||||
|
@ -47,7 +47,7 @@ struct cppi5_host_desc_t {
|
||||
u32 buf_info1;
|
||||
u32 org_buf_len;
|
||||
u64 org_buf_ptr;
|
||||
u32 epib[0];
|
||||
u32 epib[];
|
||||
} __packed;
|
||||
|
||||
#define CPPI5_DESC_MIN_ALIGN (16U)
|
||||
@ -139,7 +139,7 @@ struct cppi5_desc_epib_t {
|
||||
*/
|
||||
struct cppi5_monolithic_desc_t {
|
||||
struct cppi5_desc_hdr_t hdr;
|
||||
u32 epib[0];
|
||||
u32 epib[];
|
||||
};
|
||||
|
||||
#define CPPI5_INFO2_MDESC_DATA_OFFSET_SHIFT (18U)
|
||||
|
@ -3285,7 +3285,7 @@ static inline ino_t parent_ino(struct dentry *dentry)
|
||||
*/
|
||||
struct simple_transaction_argresp {
|
||||
ssize_t size;
|
||||
char data[0];
|
||||
char data[];
|
||||
};
|
||||
|
||||
#define SIMPLE_TRANSACTION_LIMIT (PAGE_SIZE - sizeof(struct simple_transaction_argresp))
|
||||
|
@ -14,7 +14,7 @@
|
||||
*/
|
||||
struct zynqmp_ipi_message {
|
||||
size_t len;
|
||||
u8 data[0];
|
||||
u8 data[];
|
||||
};
|
||||
|
||||
#endif /* _LINUX_ZYNQMP_IPI_MESSAGE_H_ */
|
||||
|
@ -5823,7 +5823,7 @@ struct mlx5_ifc_alloc_modify_header_context_in_bits {
|
||||
u8 reserved_at_68[0x10];
|
||||
u8 num_of_actions[0x8];
|
||||
|
||||
union mlx5_ifc_set_add_copy_action_in_auto_bits actions[0];
|
||||
union mlx5_ifc_set_add_copy_action_in_auto_bits actions[];
|
||||
};
|
||||
|
||||
struct mlx5_ifc_dealloc_modify_header_context_out_bits {
|
||||
@ -9761,7 +9761,7 @@ struct mlx5_ifc_mcda_reg_bits {
|
||||
|
||||
u8 reserved_at_60[0x20];
|
||||
|
||||
u8 data[0][0x20];
|
||||
u8 data[][0x20];
|
||||
};
|
||||
|
||||
enum {
|
||||
|
@ -1419,7 +1419,7 @@ struct ec_response_flash_info_2 {
|
||||
uint16_t num_banks_total;
|
||||
/* Number of banks described in banks array. */
|
||||
uint16_t num_banks_desc;
|
||||
struct ec_flash_bank banks[0];
|
||||
struct ec_flash_bank banks[];
|
||||
} __ec_align4;
|
||||
|
||||
/*
|
||||
@ -2420,12 +2420,12 @@ struct ec_response_motion_sense_fifo_info {
|
||||
/* Total amount of vector lost */
|
||||
uint16_t total_lost;
|
||||
/* Lost events since the last fifo_info, per sensors */
|
||||
uint16_t lost[0];
|
||||
uint16_t lost[];
|
||||
} __ec_todo_packed;
|
||||
|
||||
struct ec_response_motion_sense_fifo_data {
|
||||
uint32_t number_data;
|
||||
struct ec_response_motion_sensor_data data[0];
|
||||
struct ec_response_motion_sensor_data data[];
|
||||
} __ec_todo_packed;
|
||||
|
||||
/* List supported activity recognition */
|
||||
@ -3093,7 +3093,7 @@ struct ec_response_tmp006_get_calibration_v1 {
|
||||
uint8_t algorithm;
|
||||
uint8_t num_params;
|
||||
uint8_t reserved[2];
|
||||
float val[0];
|
||||
float val[];
|
||||
} __ec_align4;
|
||||
|
||||
struct ec_params_tmp006_set_calibration_v1 {
|
||||
@ -3101,7 +3101,7 @@ struct ec_params_tmp006_set_calibration_v1 {
|
||||
uint8_t algorithm;
|
||||
uint8_t num_params;
|
||||
uint8_t reserved;
|
||||
float val[0];
|
||||
float val[];
|
||||
} __ec_align4;
|
||||
|
||||
|
||||
@ -5076,7 +5076,7 @@ struct ec_response_pd_log {
|
||||
uint8_t type; /* event type : see PD_EVENT_xx below */
|
||||
uint8_t size_port; /* [7:5] port number [4:0] payload size in bytes */
|
||||
uint16_t data; /* type-defined data payload */
|
||||
uint8_t payload[0]; /* optional additional data payload: 0..16 bytes */
|
||||
uint8_t payload[]; /* optional additional data payload: 0..16 bytes */
|
||||
} __ec_align4;
|
||||
|
||||
/* The timestamp is the microsecond counter shifted to get about a ms. */
|
||||
@ -5789,7 +5789,7 @@ struct ec_response_fp_encryption_status {
|
||||
|
||||
struct ec_response_tp_frame_info {
|
||||
uint32_t n_frames;
|
||||
uint32_t frame_sizes[0];
|
||||
uint32_t frame_sizes[];
|
||||
} __ec_align4;
|
||||
|
||||
/* Create a snapshot of current frame readings */
|
||||
|
@ -69,7 +69,7 @@ struct cros_ec_command {
|
||||
uint32_t outsize;
|
||||
uint32_t insize;
|
||||
uint32_t result;
|
||||
uint8_t data[0];
|
||||
uint8_t data[];
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -530,7 +530,7 @@ struct module_param_attrs
|
||||
{
|
||||
unsigned int num;
|
||||
struct attribute_group grp;
|
||||
struct param_attribute attrs[0];
|
||||
struct param_attribute attrs[];
|
||||
};
|
||||
|
||||
#ifdef CONFIG_SYSFS
|
||||
|
@ -345,7 +345,7 @@ DESC_ID((id) - DESCS_COUNT(desc_ring))
|
||||
*/
|
||||
struct prb_data_block {
|
||||
unsigned long id;
|
||||
char data[0];
|
||||
char data[];
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -50,7 +50,7 @@ static bool ok_to_free_tracepoints;
|
||||
*/
|
||||
struct tp_probes {
|
||||
struct rcu_head rcu;
|
||||
struct tracepoint_func probes[0];
|
||||
struct tracepoint_func probes[];
|
||||
};
|
||||
|
||||
static inline void *allocate_probes(int count)
|
||||
|
@ -12,12 +12,13 @@
|
||||
struct msft_cp_read_supported_features {
|
||||
__u8 sub_opcode;
|
||||
} __packed;
|
||||
|
||||
struct msft_rp_read_supported_features {
|
||||
__u8 status;
|
||||
__u8 sub_opcode;
|
||||
__le64 features;
|
||||
__u8 evt_prefix_len;
|
||||
__u8 evt_prefix[0];
|
||||
__u8 evt_prefix[];
|
||||
} __packed;
|
||||
|
||||
struct msft_data {
|
||||
|
@ -124,7 +124,7 @@ struct smc_clc_v2_extension {
|
||||
struct smc_clnt_opts_area_hdr hdr;
|
||||
u8 roce[16]; /* RoCEv2 GID */
|
||||
u8 reserved[16];
|
||||
u8 user_eids[0][SMC_MAX_EID_LEN];
|
||||
u8 user_eids[][SMC_MAX_EID_LEN];
|
||||
};
|
||||
|
||||
struct smc_clc_msg_proposal_prefix { /* prefix part of clc proposal message*/
|
||||
@ -143,7 +143,7 @@ struct smc_clc_msg_smcd { /* SMC-D GID information */
|
||||
struct smc_clc_smcd_v2_extension {
|
||||
u8 system_eid[SMC_MAX_EID_LEN];
|
||||
u8 reserved[16];
|
||||
struct smc_clc_smcd_gid_chid gidchid[0];
|
||||
struct smc_clc_smcd_gid_chid gidchid[];
|
||||
};
|
||||
|
||||
struct smc_clc_msg_proposal { /* clc proposal message sent by Linux */
|
||||
|
@ -101,7 +101,7 @@ struct ima_template_entry {
|
||||
struct tpm_digest *digests;
|
||||
struct ima_template_desc *template_desc; /* template descriptor */
|
||||
u32 template_data_len;
|
||||
struct ima_field_data template_data[0]; /* template related data */
|
||||
struct ima_field_data template_data[]; /* template related data */
|
||||
};
|
||||
|
||||
struct ima_queue_entry {
|
||||
|
Loading…
Reference in New Issue
Block a user