Created
August 9, 2020 20:42
-
-
Save evdenis/46081da9d68ecefd07edc3769cebcf32 to your computer and use it in GitHub Desktop.
flexible_array.cocci patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/arch/alpha/include/asm/hwrpb.h b/arch/alpha/include/asm/hwrpb.h | |
index d8180e527a1e..fc76f36265ad 100644 | |
--- a/arch/alpha/include/asm/hwrpb.h | |
+++ b/arch/alpha/include/asm/hwrpb.h | |
@@ -152,7 +152,7 @@ struct memdesc_struct { | |
unsigned long chksum; | |
unsigned long optional_pa; | |
unsigned long numclusters; | |
- struct memclust_struct cluster[0]; | |
+ struct memclust_struct cluster[]; | |
}; | |
struct dsr_struct { | |
diff --git a/arch/ia64/include/asm/sal.h b/arch/ia64/include/asm/sal.h | |
index 08f5b6aaed73..6801bccf78ea 100644 | |
--- a/arch/ia64/include/asm/sal.h | |
+++ b/arch/ia64/include/asm/sal.h | |
@@ -420,7 +420,7 @@ typedef struct sal_log_processor_info { | |
* The rest of this structure consists of variable-length arrays, which can't be | |
* expressed in C. | |
*/ | |
- sal_log_mod_error_info_t info[0]; | |
+ sal_log_mod_error_info_t info[]; | |
/* | |
* This is what the rest looked like if C supported variable-length arrays: | |
* | |
diff --git a/arch/mips/include/asm/ptrace.h b/arch/mips/include/asm/ptrace.h | |
index 1e76774b36dd..0269c15aa722 100644 | |
--- a/arch/mips/include/asm/ptrace.h | |
+++ b/arch/mips/include/asm/ptrace.h | |
@@ -48,7 +48,7 @@ struct pt_regs { | |
unsigned long long mpl[6]; /* MTM{0-5} */ | |
unsigned long long mtp[6]; /* MTP{0-5} */ | |
#endif | |
- unsigned long __last[0]; | |
+ unsigned long __last[]; | |
} __aligned(8); | |
static inline unsigned long kernel_stack_pointer(struct pt_regs *regs) | |
diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h | |
index e020d269416d..34410acf0be0 100644 | |
--- a/arch/powerpc/include/asm/kvm_host.h | |
+++ b/arch/powerpc/include/asm/kvm_host.h | |
@@ -202,7 +202,7 @@ struct kvmppc_spapr_tce_table { | |
u64 size; /* window size in pages */ | |
struct list_head iommu_tables; | |
struct mutex alloc_lock; | |
- struct page *pages[0]; | |
+ struct page *pages[]; | |
}; | |
/* XICS components, defined in book3s_xics.c */ | |
diff --git a/arch/s390/include/asm/ccwgroup.h b/arch/s390/include/asm/ccwgroup.h | |
index ad3acb1e882b..b4ea8b6dfce4 100644 | |
--- a/arch/s390/include/asm/ccwgroup.h | |
+++ b/arch/s390/include/asm/ccwgroup.h | |
@@ -26,7 +26,7 @@ struct ccwgroup_device { | |
unsigned int count; | |
struct device dev; | |
struct work_struct ungroup_work; | |
- struct ccw_device *cdev[0]; | |
+ struct ccw_device *cdev[]; | |
}; | |
/** | |
diff --git a/arch/s390/include/asm/chsc.h b/arch/s390/include/asm/chsc.h | |
index 36ce2d25a5fc..0a3f6fbab53a 100644 | |
--- a/arch/s390/include/asm/chsc.h | |
+++ b/arch/s390/include/asm/chsc.h | |
@@ -56,7 +56,7 @@ struct chsc_pnso_area { | |
struct chsc_header response; | |
u32:32; | |
struct chsc_pnso_naihdr naihdr; | |
- struct chsc_pnso_naid_l2 entries[0]; | |
+ struct chsc_pnso_naid_l2 entries[]; | |
} __packed __aligned(PAGE_SIZE); | |
#endif /* _ASM_S390_CHSC_H */ | |
diff --git a/arch/s390/include/asm/eadm.h b/arch/s390/include/asm/eadm.h | |
index bb63b2afdf6f..fbdfb4364ab8 100644 | |
--- a/arch/s390/include/asm/eadm.h | |
+++ b/arch/s390/include/asm/eadm.h | |
@@ -78,7 +78,7 @@ struct aob { | |
struct aob_rq_header { | |
struct scm_device *scmdev; | |
- char data[0]; | |
+ char data[]; | |
}; | |
struct scm_device { | |
diff --git a/arch/s390/include/asm/fcx.h b/arch/s390/include/asm/fcx.h | |
index cff0749e9657..29784b4b44f6 100644 | |
--- a/arch/s390/include/asm/fcx.h | |
+++ b/arch/s390/include/asm/fcx.h | |
@@ -214,7 +214,7 @@ struct dcw_intrg_data { | |
u32 :32; | |
u64 time; | |
u64 prog_id; | |
- u8 prog_data[0]; | |
+ u8 prog_data[]; | |
} __attribute__ ((packed)); | |
#define DCW_FLAGS_CC (1 << (7 - 1)) | |
@@ -241,7 +241,7 @@ struct dcw { | |
u32 :8; | |
u32 cd_count:8; | |
u32 count; | |
- u8 cd[0]; | |
+ u8 cd[]; | |
} __attribute__ ((packed)); | |
#define TCCB_FORMAT_DEFAULT 0x7f | |
@@ -286,7 +286,7 @@ struct tccb_tcat { | |
*/ | |
struct tccb { | |
struct tccb_tcah tcah; | |
- u8 tca[0]; | |
+ u8 tca[]; | |
} __attribute__ ((packed, aligned(8))); | |
struct tcw *tcw_get_intrg(struct tcw *tcw); | |
diff --git a/arch/s390/include/asm/idals.h b/arch/s390/include/asm/idals.h | |
index 6fb7aced104a..40eae2c08d61 100644 | |
--- a/arch/s390/include/asm/idals.h | |
+++ b/arch/s390/include/asm/idals.h | |
@@ -108,7 +108,7 @@ clear_normalized_cda(struct ccw1 * ccw) | |
struct idal_buffer { | |
size_t size; | |
size_t page_order; | |
- void *data[0]; | |
+ void *data[]; | |
}; | |
/* | |
diff --git a/arch/s390/include/asm/sclp.h b/arch/s390/include/asm/sclp.h | |
index c563f8368b19..eeb71907174c 100644 | |
--- a/arch/s390/include/asm/sclp.h | |
+++ b/arch/s390/include/asm/sclp.h | |
@@ -105,7 +105,7 @@ struct zpci_report_error_header { | |
* (OpenCrypto Successful Diagnostics Execution) | |
*/ | |
u16 length; /* Length of Subsequent Data (up to 4K – SCLP header */ | |
- u8 data[0]; /* Subsequent Data passed verbatim to SCLP ET 24 */ | |
+ u8 data[]; /* Subsequent Data passed verbatim to SCLP ET 24 */ | |
} __packed; | |
int sclp_early_read_info(void); | |
diff --git a/arch/s390/include/asm/sysinfo.h b/arch/s390/include/asm/sysinfo.h | |
index fe7b3f8f0791..ab1c6316055c 100644 | |
--- a/arch/s390/include/asm/sysinfo.h | |
+++ b/arch/s390/include/asm/sysinfo.h | |
@@ -67,12 +67,12 @@ struct sysinfo_1_2_2 { | |
unsigned short cpus_configured; | |
unsigned short cpus_standby; | |
unsigned short cpus_reserved; | |
- unsigned short adjustment[0]; | |
+ unsigned short adjustment[]; | |
}; | |
struct sysinfo_1_2_2_extension { | |
unsigned int alt_capability; | |
- unsigned short alt_adjustment[0]; | |
+ unsigned short alt_adjustment[]; | |
}; | |
struct sysinfo_2_2_1 { | |
@@ -181,7 +181,7 @@ struct sysinfo_15_1_x { | |
unsigned char reserved1; | |
unsigned char mnest; | |
unsigned char reserved2[4]; | |
- union topology_entry tle[0]; | |
+ union topology_entry tle[]; | |
}; | |
int stsi(void *sysinfo, int fc, int sel1, int sel2); | |
diff --git a/arch/sh/include/asm/thread_info.h b/arch/sh/include/asm/thread_info.h | |
index 6404be69d5fa..6343db4a249e 100644 | |
--- a/arch/sh/include/asm/thread_info.h | |
+++ b/arch/sh/include/asm/thread_info.h | |
@@ -35,7 +35,7 @@ struct thread_info { | |
mm_segment_t addr_limit; /* thread address space */ | |
unsigned long previous_sp; /* sp of previous stack in case | |
of nested IRQ stacks */ | |
- __u8 supervisor_stack[0]; | |
+ __u8 supervisor_stack[]; | |
}; | |
#endif | |
diff --git a/arch/sparc/include/asm/vio.h b/arch/sparc/include/asm/vio.h | |
index 059f0eb678e0..0ad94901f202 100644 | |
--- a/arch/sparc/include/asm/vio.h | |
+++ b/arch/sparc/include/asm/vio.h | |
@@ -70,7 +70,7 @@ struct vio_dring_register { | |
#define VIO_RX_DRING_DATA 0x0004 | |
u16 resv; | |
u32 num_cookies; | |
- struct ldc_trans_cookie cookies[0]; | |
+ struct ldc_trans_cookie cookies[]; | |
}; | |
struct vio_dring_unregister { | |
@@ -161,7 +161,7 @@ struct vio_disk_desc { | |
u64 size; | |
u32 ncookies; | |
u32 resv2; | |
- struct ldc_trans_cookie cookies[0]; | |
+ struct ldc_trans_cookie cookies[]; | |
}; | |
#define VIO_DISK_VNAME_LEN 8 | |
@@ -200,13 +200,13 @@ struct vio_disk_devid { | |
u16 resv; | |
u16 type; | |
u32 len; | |
- char id[0]; | |
+ char id[]; | |
}; | |
struct vio_disk_efi { | |
u64 lba; | |
u64 len; | |
- char data[0]; | |
+ char data[]; | |
}; | |
/* VIO net specific structures and defines */ | |
@@ -246,7 +246,7 @@ struct vio_net_desc { | |
struct vio_dring_hdr hdr; | |
u32 size; | |
u32 ncookies; | |
- struct ldc_trans_cookie cookies[0]; | |
+ struct ldc_trans_cookie cookies[]; | |
}; | |
struct vio_net_dext { | |
diff --git a/arch/um/include/shared/net_kern.h b/arch/um/include/shared/net_kern.h | |
index a87be13c5b87..67fff7ee328a 100644 | |
--- a/arch/um/include/shared/net_kern.h | |
+++ b/arch/um/include/shared/net_kern.h | |
@@ -39,7 +39,7 @@ struct uml_net_private { | |
void (*add_address)(unsigned char *, unsigned char *, void *); | |
void (*delete_address)(unsigned char *, unsigned char *, void *); | |
- char user[0]; | |
+ char user[]; | |
}; | |
struct net_kern_info { | |
diff --git a/arch/x86/include/asm/fpu/types.h b/arch/x86/include/asm/fpu/types.h | |
index c87364ea6446..e98dd8b22ec6 100644 | |
--- a/arch/x86/include/asm/fpu/types.h | |
+++ b/arch/x86/include/asm/fpu/types.h | |
@@ -280,7 +280,7 @@ struct xstate_header { | |
struct xregs_state { | |
struct fxregs_state i387; | |
struct xstate_header header; | |
- u8 extended_state_area[0]; | |
+ u8 extended_state_area[]; | |
} __attribute__ ((packed, aligned (64))); | |
/* | |
diff --git a/arch/x86/include/asm/microcode_amd.h b/arch/x86/include/asm/microcode_amd.h | |
index 7063b5a43220..ac31f9140d07 100644 | |
--- a/arch/x86/include/asm/microcode_amd.h | |
+++ b/arch/x86/include/asm/microcode_amd.h | |
@@ -38,7 +38,7 @@ struct microcode_header_amd { | |
struct microcode_amd { | |
struct microcode_header_amd hdr; | |
- unsigned int mpb[0]; | |
+ unsigned int mpb[]; | |
}; | |
#define PATCH_MAX_SIZE (3 * PAGE_SIZE) | |
diff --git a/arch/x86/include/asm/microcode_intel.h b/arch/x86/include/asm/microcode_intel.h | |
index d85a07d7154f..4c92cea7e4b5 100644 | |
--- a/arch/x86/include/asm/microcode_intel.h | |
+++ b/arch/x86/include/asm/microcode_intel.h | |
@@ -19,7 +19,7 @@ struct microcode_header_intel { | |
struct microcode_intel { | |
struct microcode_header_intel hdr; | |
- unsigned int bits[0]; | |
+ unsigned int bits[]; | |
}; | |
/* microcode format is extended from prescott processors */ | |
@@ -33,7 +33,7 @@ struct extended_sigtable { | |
unsigned int count; | |
unsigned int cksum; | |
unsigned int reserved[3]; | |
- struct extended_signature sigs[0]; | |
+ struct extended_signature sigs[]; | |
}; | |
#define DEFAULT_UCODE_DATASIZE (2000) | |
diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h | |
index 7ccb338507e3..afbe4ab16670 100644 | |
--- a/arch/x86/include/asm/pci.h | |
+++ b/arch/x86/include/asm/pci.h | |
@@ -146,7 +146,7 @@ struct pci_setup_rom { | |
unsigned long bus; | |
unsigned long device; | |
unsigned long function; | |
- uint8_t romdata[0]; | |
+ uint8_t romdata[]; | |
}; | |
#endif /* _ASM_X86_PCI_H */ | |
diff --git a/arch/x86/include/asm/pci_x86.h b/arch/x86/include/asm/pci_x86.h | |
index 73bb404f4d2a..530a212ca441 100644 | |
--- a/arch/x86/include/asm/pci_x86.h | |
+++ b/arch/x86/include/asm/pci_x86.h | |
@@ -87,7 +87,7 @@ struct irq_routing_table { | |
u32 miniport_data; /* Crap */ | |
u8 rfu[11]; | |
u8 checksum; /* Modulo 256 checksum must give 0 */ | |
- struct irq_info slots[0]; | |
+ struct irq_info slots[]; | |
} __attribute__((packed)); | |
extern unsigned int pcibios_irq_mask; | |
diff --git a/arch/xtensa/include/asm/bootparam.h b/arch/xtensa/include/asm/bootparam.h | |
index 892aab399ac8..6333bd1eb9d2 100644 | |
--- a/arch/xtensa/include/asm/bootparam.h | |
+++ b/arch/xtensa/include/asm/bootparam.h | |
@@ -34,7 +34,7 @@ | |
typedef struct bp_tag { | |
unsigned short id; /* tag id */ | |
unsigned short size; /* size of this record excluding the structure*/ | |
- unsigned long data[0]; /* data */ | |
+ unsigned long data[]; /* data */ | |
} bp_tag_t; | |
struct bp_meminfo { | |
diff --git a/arch/xtensa/include/asm/processor.h b/arch/xtensa/include/asm/processor.h | |
index 7f63aca6a0d3..27b8145d3547 100644 | |
--- a/arch/xtensa/include/asm/processor.h | |
+++ b/arch/xtensa/include/asm/processor.h | |
@@ -154,7 +154,7 @@ struct thread_struct { | |
struct perf_event *ptrace_wp[XCHAL_NUM_DBREAK]; | |
#endif | |
/* Make structure 16 bytes aligned. */ | |
- int align[0] __attribute__ ((aligned(16))); | |
+ int align[] __attribute__ ((aligned(16))); | |
}; | |
/* This decides where the kernel will search for a free chunk of vm | |
diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c | |
index 7c138a4edc03..50695317d0a4 100644 | |
--- a/drivers/acpi/nfit/core.c | |
+++ b/drivers/acpi/nfit/core.c | |
@@ -2207,7 +2207,7 @@ struct nfit_set_info { | |
u64 region_offset; | |
u32 serial_number; | |
u32 pad; | |
- } mapping[0]; | |
+ } mapping[]; | |
}; | |
struct nfit_set_info2 { | |
@@ -2218,7 +2218,7 @@ struct nfit_set_info2 { | |
u16 manufacturing_date; | |
u8 manufacturing_location; | |
u8 reserved[31]; | |
- } mapping[0]; | |
+ } mapping[]; | |
}; | |
static size_t sizeof_nfit_set_info(int num_mappings) | |
diff --git a/drivers/crypto/caam/pdb.h b/drivers/crypto/caam/pdb.h | |
index 8ccc22075043..4b1bcf53f7ac 100644 | |
--- a/drivers/crypto/caam/pdb.h | |
+++ b/drivers/crypto/caam/pdb.h | |
@@ -144,7 +144,7 @@ struct ipsec_encap_pdb { | |
}; | |
u32 spi; | |
u32 ip_hdr_len; | |
- u32 ip_hdr[0]; | |
+ u32 ip_hdr[]; | |
}; | |
/** | |
diff --git a/drivers/gpu/drm/nouveau/include/nvfw/hs.h b/drivers/gpu/drm/nouveau/include/nvfw/hs.h | |
index 64d0d32200c2..b53bbc4cd130 100644 | |
--- a/drivers/gpu/drm/nouveau/include/nvfw/hs.h | |
+++ b/drivers/gpu/drm/nouveau/include/nvfw/hs.h | |
@@ -23,7 +23,7 @@ struct nvfw_hs_load_header { | |
u32 data_dma_base; | |
u32 data_size; | |
u32 num_apps; | |
- u32 apps[0]; | |
+ u32 apps[]; | |
}; | |
const struct nvfw_hs_load_header * | |
diff --git a/drivers/gpu/drm/qxl/qxl_dev.h b/drivers/gpu/drm/qxl/qxl_dev.h | |
index a7bc31f6d565..06caa61b5d66 100644 | |
--- a/drivers/gpu/drm/qxl/qxl_dev.h | |
+++ b/drivers/gpu/drm/qxl/qxl_dev.h | |
@@ -271,7 +271,7 @@ struct qxl_mode { | |
/* qxl-1 compat: fixed */ | |
struct qxl_modes { | |
uint32_t n_modes; | |
- struct qxl_mode modes[0]; | |
+ struct qxl_mode modes[]; | |
}; | |
/* qxl-1 compat: append only */ | |
@@ -382,12 +382,12 @@ struct qxl_data_chunk { | |
uint32_t data_size; | |
QXLPHYSICAL prev_chunk; | |
QXLPHYSICAL next_chunk; | |
- uint8_t data[0]; | |
+ uint8_t data[]; | |
}; | |
struct qxl_message { | |
union qxl_release_info release_info; | |
- uint8_t data[0]; | |
+ uint8_t data[]; | |
}; | |
struct qxl_compat_update_cmd { | |
@@ -469,7 +469,7 @@ struct qxl_raster_glyph { | |
struct qxl_point glyph_origin; | |
uint16_t width; | |
uint16_t height; | |
- uint8_t data[0]; | |
+ uint8_t data[]; | |
}; | |
struct qxl_string { | |
@@ -768,7 +768,7 @@ enum { | |
struct qxl_path_seg { | |
uint32_t flags; | |
uint32_t count; | |
- struct qxl_point_fix points[0]; | |
+ struct qxl_point_fix points[]; | |
}; | |
struct qxl_path { | |
@@ -819,7 +819,7 @@ struct qxl_image_descriptor { | |
struct qxl_palette { | |
uint64_t unique; | |
uint16_t num_ents; | |
- uint32_t ents[0]; | |
+ uint32_t ents[]; | |
}; | |
struct qxl_bitmap { | |
@@ -838,7 +838,7 @@ struct qxl_surface_id { | |
struct qxl_encoder_data { | |
uint32_t data_size; | |
- uint8_t data[0]; | |
+ uint8_t data[]; | |
}; | |
struct qxl_image { | |
@@ -868,7 +868,7 @@ struct qxl_monitors_config { | |
uint16_t count; | |
uint16_t max_allowed; /* If it is 0 no fixed limit is given by the | |
driver */ | |
- struct qxl_head heads[0]; | |
+ struct qxl_head heads[]; | |
}; | |
#pragma pack(pop) | |
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_validation.c b/drivers/gpu/drm/vmwgfx/vmwgfx_validation.c | |
index e69bc373ae2e..3c6aaad762d3 100644 | |
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_validation.c | |
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_validation.c | |
@@ -81,7 +81,7 @@ struct vmw_validation_res_node { | |
u32 reserved : 1; | |
u32 dirty : 1; | |
u32 dirty_set : 1; | |
- unsigned long private[0]; | |
+ unsigned long private[]; | |
}; | |
/** | |
diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c | |
index 86dbe0c8b45c..67969fa6dd15 100644 | |
--- a/drivers/md/dm-writecache.c | |
+++ b/drivers/md/dm-writecache.c | |
@@ -73,7 +73,7 @@ struct wc_memory_superblock { | |
}; | |
__le64 padding[8]; | |
}; | |
- struct wc_memory_entry entries[0]; | |
+ struct wc_memory_entry entries[]; | |
}; | |
struct wc_entry { | |
diff --git a/drivers/misc/habanalabs/include/common/armcp_if.h b/drivers/misc/habanalabs/include/common/armcp_if.h | |
index 07f9972db28d..76d5e317c2d0 100644 | |
--- a/drivers/misc/habanalabs/include/common/armcp_if.h | |
+++ b/drivers/misc/habanalabs/include/common/armcp_if.h | |
@@ -293,7 +293,7 @@ struct armcp_packet { | |
struct armcp_unmask_irq_arr_packet { | |
struct armcp_packet armcp_pkt; | |
__le32 length; | |
- __le32 irqs[0]; | |
+ __le32 irqs[]; | |
}; | |
enum armcp_packet_rc { | |
diff --git a/drivers/misc/habanalabs/include/gaudi/gaudi_packets.h b/drivers/misc/habanalabs/include/gaudi/gaudi_packets.h | |
index f30f2c0458d7..5ee81f43a6b2 100644 | |
--- a/drivers/misc/habanalabs/include/gaudi/gaudi_packets.h | |
+++ b/drivers/misc/habanalabs/include/gaudi/gaudi_packets.h | |
@@ -54,7 +54,7 @@ struct gaudi_packet { | |
/* The rest of the packet data follows. Use the corresponding | |
* packet_XXX struct to deference the data, based on packet type | |
*/ | |
- u8 contents[0]; | |
+ u8 contents[]; | |
}; | |
struct packet_nop { | |
@@ -75,7 +75,7 @@ struct packet_wreg32 { | |
struct packet_wreg_bulk { | |
__le32 size64; | |
__le32 ctl; | |
- __le64 values[0]; /* data starts here */ | |
+ __le64 values[]; /* data starts here */ | |
}; | |
struct packet_msg_long { | |
diff --git a/drivers/misc/habanalabs/include/goya/goya_packets.h b/drivers/misc/habanalabs/include/goya/goya_packets.h | |
index ef54bad20509..50ce5175b63a 100644 | |
--- a/drivers/misc/habanalabs/include/goya/goya_packets.h | |
+++ b/drivers/misc/habanalabs/include/goya/goya_packets.h | |
@@ -62,7 +62,7 @@ struct goya_packet { | |
/* The rest of the packet data follows. Use the corresponding | |
* packet_XXX struct to deference the data, based on packet type | |
*/ | |
- u8 contents[0]; | |
+ u8 contents[]; | |
}; | |
struct packet_nop { | |
@@ -86,7 +86,7 @@ struct packet_wreg32 { | |
struct packet_wreg_bulk { | |
__le32 size64; | |
__le32 ctl; | |
- __le64 values[0]; /* data starts here */ | |
+ __le64 values[]; /* data starts here */ | |
}; | |
struct packet_msg_long { | |
diff --git a/drivers/misc/mei/hw.h b/drivers/misc/mei/hw.h | |
index 26fa92cb7f7a..3bafff4960d5 100644 | |
--- a/drivers/misc/mei/hw.h | |
+++ b/drivers/misc/mei/hw.h | |
@@ -206,7 +206,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 */ | |
diff --git a/drivers/net/ethernet/freescale/enetc/enetc_hw.h b/drivers/net/ethernet/freescale/enetc/enetc_hw.h | |
index 17cf7c94fdb5..92bc45ce4966 100644 | |
--- a/drivers/net/ethernet/freescale/enetc/enetc_hw.h | |
+++ b/drivers/net/ethernet/freescale/enetc/enetc_hw.h | |
@@ -743,7 +743,7 @@ struct sgcl_data { | |
u32 bth; | |
u32 ct; | |
u32 cte; | |
- struct sgce sgcl[0]; | |
+ struct sgce sgcl[]; | |
}; | |
#define ENETC_CBDR_FMI_MR BIT(0) | |
diff --git a/drivers/net/ethernet/freescale/enetc/enetc_qos.c b/drivers/net/ethernet/freescale/enetc/enetc_qos.c | |
index 1c4a535890da..586700b0c44e 100644 | |
--- a/drivers/net/ethernet/freescale/enetc/enetc_qos.c | |
+++ b/drivers/net/ethernet/freescale/enetc/enetc_qos.c | |
@@ -405,7 +405,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 | |
diff --git a/drivers/net/ethernet/i825xx/sun3_82586.h b/drivers/net/ethernet/i825xx/sun3_82586.h | |
index 79aef681ac85..451cb3d26cb5 100644 | |
--- a/drivers/net/ethernet/i825xx/sun3_82586.h | |
+++ b/drivers/net/ethernet/i825xx/sun3_82586.h | |
@@ -250,7 +250,7 @@ struct mcsetup_cmd_struct | |
unsigned short cmd_cmd; | |
unsigned short cmd_link; | |
unsigned short mc_cnt; /* number of bytes in the MC-List */ | |
- unsigned char mc_list[0][6]; /* pointer to 6 bytes entries */ | |
+ unsigned char mc_list[][6]; /* pointer to 6 bytes entries */ | |
}; | |
/* | |
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | |
index a46efe37cfa9..1d5e8eac1108 100644 | |
--- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | |
+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | |
@@ -328,7 +328,7 @@ struct mlx4_en_tx_ring { | |
struct mlx4_en_rx_desc { | |
/* actual number of entries depends on rx ring stride */ | |
- struct mlx4_wqe_data_seg data[0]; | |
+ struct mlx4_wqe_data_seg data[]; | |
}; | |
struct mlx4_en_rx_ring { | |
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h | |
index 0cc2080fd847..06b61c7ebb70 100644 | |
--- a/drivers/net/ethernet/mellanox/mlx5/core/en.h | |
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h | |
@@ -193,7 +193,7 @@ static inline int mlx5e_get_max_num_channels(struct mlx5_core_dev *mdev) | |
struct mlx5e_tx_wqe { | |
struct mlx5_wqe_ctrl_seg ctrl; | |
struct mlx5_wqe_eth_seg eth; | |
- struct mlx5_wqe_data_seg data[0]; | |
+ struct mlx5_wqe_data_seg data[]; | |
}; | |
struct mlx5e_rx_wqe_ll { | |
@@ -202,14 +202,14 @@ struct mlx5e_rx_wqe_ll { | |
}; | |
struct mlx5e_rx_wqe_cyc { | |
- struct mlx5_wqe_data_seg data[0]; | |
+ struct mlx5_wqe_data_seg data[]; | |
}; | |
struct mlx5e_umr_wqe { | |
struct mlx5_wqe_ctrl_seg ctrl; | |
struct mlx5_wqe_umr_ctrl_seg uctrl; | |
struct mlx5_mkey_seg mkc; | |
- struct mlx5_mtt inline_mtts[0]; | |
+ struct mlx5_mtt inline_mtts[]; | |
}; | |
extern const char mlx5e_self_tests[][ETH_GSTRING_LEN]; | |
diff --git a/drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_format.h b/drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_format.h | |
index b001e5258091..533879fb79b1 100644 | |
--- a/drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_format.h | |
+++ b/drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_format.h | |
@@ -44,7 +44,7 @@ MLXFW_MFA2_TLV(multi, struct mlxfw_mfa2_tlv_multi, | |
MLXFW_MFA2_TLV_MULTI_PART); | |
struct mlxfw_mfa2_tlv_psid { | |
- u8 psid[0]; | |
+ u8 psid[]; | |
} __packed; | |
MLXFW_MFA2_TLV_VARSIZE(psid, struct mlxfw_mfa2_tlv_psid, | |
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.c b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.c | |
index 9f6905fa6b47..18381a4f16ae 100644 | |
--- a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.c | |
+++ b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.c | |
@@ -136,7 +136,7 @@ struct mlxsw_afk_picker { | |
struct { | |
DECLARE_BITMAP(element, MLXSW_AFK_ELEMENT_MAX); | |
unsigned int total; | |
- } hits[0]; | |
+ } hits[]; | |
}; | |
static void mlxsw_afk_picker_count_hits(struct mlxsw_afk *mlxsw_afk, | |
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c | |
index 47eb751a2570..7846a21555ef 100644 | |
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c | |
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c | |
@@ -15,7 +15,7 @@ struct mlxsw_sp_mr { | |
struct list_head table_list; | |
struct mutex table_list_lock; /* Protects table_list */ | |
#define MLXSW_SP_MR_ROUTES_COUNTER_UPDATE_INTERVAL 5000 /* ms */ | |
- unsigned long priv[0]; | |
+ unsigned long priv[]; | |
/* priv has to be always the last item */ | |
}; | |
diff --git a/drivers/net/ethernet/netronome/nfp/crypto/fw.h b/drivers/net/ethernet/netronome/nfp/crypto/fw.h | |
index 8d1458896bcb..dcb67c2b5e5e 100644 | |
--- a/drivers/net/ethernet/netronome/nfp/crypto/fw.h | |
+++ b/drivers/net/ethernet/netronome/nfp/crypto/fw.h | |
@@ -40,7 +40,7 @@ struct nfp_crypto_req_add_front { | |
__be16 ipver_vlan __packed; | |
u8 l4_proto; | |
#define NFP_NET_TLS_NON_ADDR_KEY_LEN 8 | |
- u8 l3_addrs[0]; | |
+ u8 l3_addrs[]; | |
}; | |
struct nfp_crypto_req_add_back { | |
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h | |
index 2181d4538ab7..01791f93d87e 100644 | |
--- a/drivers/net/hyperv/hyperv_net.h | |
+++ b/drivers/net/hyperv/hyperv_net.h | |
@@ -782,7 +782,7 @@ struct nvsp_6_pd_batch_msg { | |
u16 guest2host:1; | |
u16 is_recv:1; | |
u16 reserved:14; | |
- struct nvsp_6_pd_buf pd_buf[0]; | |
+ struct nvsp_6_pd_buf pd_buf[]; | |
} __packed; | |
union nvsp_6_message_uber { | |
diff --git a/drivers/net/wireless/ath/ath10k/htc.h b/drivers/net/wireless/ath/ath10k/htc.h | |
index 0d180faf3b77..3e4db0b0cdf2 100644 | |
--- a/drivers/net/wireless/ath/ath10k/htc.h | |
+++ b/drivers/net/wireless/ath/ath10k/htc.h | |
@@ -263,7 +263,7 @@ struct ath10k_htc_frame { | |
struct ath10k_htc_msg msg; | |
u8 payload[0]; | |
}; | |
- struct ath10k_htc_record trailer[0]; | |
+ struct ath10k_htc_record trailer[]; | |
} __packed __aligned(4); | |
/*******************/ | |
diff --git a/drivers/net/wireless/ath/ath10k/htt.h b/drivers/net/wireless/ath/ath10k/htt.h | |
index cad59494f175..4070c4f92b6c 100644 | |
--- a/drivers/net/wireless/ath/ath10k/htt.h | |
+++ b/drivers/net/wireless/ath/ath10k/htt.h | |
@@ -196,7 +196,7 @@ struct htt_data_tx_desc { | |
__le16 freq; | |
} __packed offchan_tx; | |
} __packed; | |
- u8 prefetch[0]; /* start of frame, for FW classification engine */ | |
+ u8 prefetch[]; /* start of frame, for FW classification engine */ | |
} __packed; | |
struct htt_data_tx_desc_64 { | |
@@ -212,7 +212,7 @@ struct htt_data_tx_desc_64 { | |
__le16 freq; | |
} __packed offchan_tx; | |
} __packed; | |
- u8 prefetch[0]; /* start of frame, for FW classification engine */ | |
+ u8 prefetch[]; /* start of frame, for FW classification engine */ | |
} __packed; | |
enum htt_rx_ring_flags { | |
diff --git a/drivers/net/wireless/ath/ath10k/swap.h b/drivers/net/wireless/ath/ath10k/swap.h | |
index 25e0ad36ddb1..b4733b5ded34 100644 | |
--- a/drivers/net/wireless/ath/ath10k/swap.h | |
+++ b/drivers/net/wireless/ath/ath10k/swap.h | |
@@ -17,7 +17,7 @@ struct ath10k_fw_file; | |
struct ath10k_swap_code_seg_tlv { | |
__le32 address; | |
__le32 length; | |
- u8 data[0]; | |
+ u8 data[]; | |
} __packed; | |
struct ath10k_swap_code_seg_tail { | |
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h | |
index 511144b36231..381dd3a2f798 100644 | |
--- a/drivers/net/wireless/ath/ath10k/wmi.h | |
+++ b/drivers/net/wireless/ath/ath10k/wmi.h | |
@@ -3202,7 +3202,7 @@ struct wmi_start_scan_tlvs { | |
/* TLV parameters. These includes channel list, ssid list, bssid list, | |
* extra ies. | |
*/ | |
- u8 tlvs[0]; | |
+ u8 tlvs[]; | |
} __packed; | |
struct wmi_start_scan_cmd { | |
diff --git a/drivers/net/wireless/ath/ath11k/ce.h b/drivers/net/wireless/ath/ath11k/ce.h | |
index 688f357e6eaf..405a826e4dff 100644 | |
--- a/drivers/net/wireless/ath/ath11k/ce.h | |
+++ b/drivers/net/wireless/ath/ath11k/ce.h | |
@@ -144,7 +144,7 @@ struct ath11k_ce_ring { | |
u32 hal_ring_id; | |
/* keep last */ | |
- struct sk_buff *skb[0]; | |
+ struct sk_buff *skb[]; | |
}; | |
struct ath11k_ce_pipe { | |
diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h | |
index e5c4e19020ee..20703a7596dc 100644 | |
--- a/drivers/net/wireless/ath/ath11k/core.h | |
+++ b/drivers/net/wireless/ath/ath11k/core.h | |
@@ -715,7 +715,7 @@ struct ath11k_base { | |
u32 num_db_cap; | |
/* must be last */ | |
- u8 drv_priv[0] __aligned(sizeof(void *)); | |
+ u8 drv_priv[] __aligned(sizeof(void *)); | |
}; | |
struct ath11k_fw_stats_pdev { | |
diff --git a/drivers/net/wireless/ath/ath11k/dbring.h b/drivers/net/wireless/ath/ath11k/dbring.h | |
index f7fce9ef9c36..bdf4af6521ac 100644 | |
--- a/drivers/net/wireless/ath/ath11k/dbring.h | |
+++ b/drivers/net/wireless/ath/ath11k/dbring.h | |
@@ -13,7 +13,7 @@ | |
struct ath11k_dbring_element { | |
dma_addr_t paddr; | |
- u8 payload[0]; | |
+ u8 payload[]; | |
}; | |
struct ath11k_dbring_data { | |
diff --git a/drivers/net/wireless/ath/ath11k/debug_htt_stats.h b/drivers/net/wireless/ath/ath11k/debug_htt_stats.h | |
index 682a6ff222bd..7b95c18ef31b 100644 | |
--- a/drivers/net/wireless/ath/ath11k/debug_htt_stats.h | |
+++ b/drivers/net/wireless/ath/ath11k/debug_htt_stats.h | |
@@ -134,7 +134,7 @@ enum htt_tx_pdev_underrun_enum { | |
/* Bytes stored in little endian order */ | |
/* Length should be multiple of DWORD */ | |
struct htt_stats_string_tlv { | |
- u32 data[0]; /* Can be variable length */ | |
+ u32 data[]; /* Can be variable length */ | |
} __packed; | |
/* == TX PDEV STATS == */ | |
@@ -194,27 +194,27 @@ struct htt_tx_pdev_stats_cmn_tlv { | |
/* NOTE: Variable length TLV, use length spec to infer array size */ | |
struct htt_tx_pdev_stats_urrn_tlv_v { | |
- u32 urrn_stats[0]; /* HTT_TX_PDEV_MAX_URRN_STATS */ | |
+ u32 urrn_stats[]; /* HTT_TX_PDEV_MAX_URRN_STATS */ | |
}; | |
/* NOTE: Variable length TLV, use length spec to infer array size */ | |
struct htt_tx_pdev_stats_flush_tlv_v { | |
- u32 flush_errs[0]; /* HTT_TX_PDEV_MAX_FLUSH_REASON_STATS */ | |
+ u32 flush_errs[]; /* HTT_TX_PDEV_MAX_FLUSH_REASON_STATS */ | |
}; | |
/* NOTE: Variable length TLV, use length spec to infer array size */ | |
struct htt_tx_pdev_stats_sifs_tlv_v { | |
- u32 sifs_status[0]; /* HTT_TX_PDEV_MAX_SIFS_BURST_STATS */ | |
+ u32 sifs_status[]; /* HTT_TX_PDEV_MAX_SIFS_BURST_STATS */ | |
}; | |
/* NOTE: Variable length TLV, use length spec to infer array size */ | |
struct htt_tx_pdev_stats_phy_err_tlv_v { | |
- u32 phy_errs[0]; /* HTT_TX_PDEV_MAX_PHY_ERR_STATS */ | |
+ u32 phy_errs[]; /* HTT_TX_PDEV_MAX_PHY_ERR_STATS */ | |
}; | |
/* NOTE: Variable length TLV, use length spec to infer array size */ | |
struct htt_tx_pdev_stats_sifs_hist_tlv_v { | |
- u32 sifs_hist_status[0]; /* HTT_TX_PDEV_SIFS_BURST_HIST_STATS */ | |
+ u32 sifs_hist_status[]; /* HTT_TX_PDEV_SIFS_BURST_HIST_STATS */ | |
}; | |
struct htt_tx_pdev_stats_tx_ppdu_stats_tlv_v { | |
@@ -556,19 +556,19 @@ struct htt_tx_hwq_difs_latency_stats_tlv_v { | |
/* NOTE: Variable length TLV, use length spec to infer array size */ | |
struct htt_tx_hwq_cmd_result_stats_tlv_v { | |
/* Histogram of sched cmd result */ | |
- u32 cmd_result[0]; /* HTT_TX_HWQ_MAX_CMD_RESULT_STATS */ | |
+ u32 cmd_result[]; /* HTT_TX_HWQ_MAX_CMD_RESULT_STATS */ | |
}; | |
/* NOTE: Variable length TLV, use length spec to infer array size */ | |
struct htt_tx_hwq_cmd_stall_stats_tlv_v { | |
/* Histogram of various pause conitions */ | |
- u32 cmd_stall_status[0]; /* HTT_TX_HWQ_MAX_CMD_STALL_STATS */ | |
+ u32 cmd_stall_status[]; /* HTT_TX_HWQ_MAX_CMD_STALL_STATS */ | |
}; | |
/* NOTE: Variable length TLV, use length spec to infer array size */ | |
struct htt_tx_hwq_fes_result_stats_tlv_v { | |
/* Histogram of number of user fes result */ | |
- u32 fes_result[0]; /* HTT_TX_HWQ_MAX_FES_RESULT_STATS */ | |
+ u32 fes_result[]; /* HTT_TX_HWQ_MAX_FES_RESULT_STATS */ | |
}; | |
/* NOTE: Variable length TLV, use length spec to infer array size | |
@@ -601,7 +601,7 @@ struct htt_tx_hwq_tried_mpdu_cnt_hist_tlv_v { | |
*/ | |
struct htt_tx_hwq_txop_used_cnt_hist_tlv_v { | |
/* Histogram of txop used cnt */ | |
- u32 txop_used_cnt_hist[0]; /* HTT_TX_HWQ_TXOP_USED_CNT_HIST */ | |
+ u32 txop_used_cnt_hist[]; /* HTT_TX_HWQ_TXOP_USED_CNT_HIST */ | |
}; | |
/* == TX SELFGEN STATS == */ | |
@@ -748,17 +748,17 @@ struct htt_tx_pdev_mpdu_stats_tlv { | |
/* == TX SCHED STATS == */ | |
/* NOTE: Variable length TLV, use length spec to infer array size */ | |
struct htt_sched_txq_cmd_posted_tlv_v { | |
- u32 sched_cmd_posted[0]; /* HTT_TX_PDEV_SCHED_TX_MODE_MAX */ | |
+ u32 sched_cmd_posted[]; /* HTT_TX_PDEV_SCHED_TX_MODE_MAX */ | |
}; | |
/* NOTE: Variable length TLV, use length spec to infer array size */ | |
struct htt_sched_txq_cmd_reaped_tlv_v { | |
- u32 sched_cmd_reaped[0]; /* HTT_TX_PDEV_SCHED_TX_MODE_MAX */ | |
+ u32 sched_cmd_reaped[]; /* HTT_TX_PDEV_SCHED_TX_MODE_MAX */ | |
}; | |
/* NOTE: Variable length TLV, use length spec to infer array size */ | |
struct htt_sched_txq_sched_order_su_tlv_v { | |
- u32 sched_order_su[0]; /* HTT_TX_PDEV_NUM_SCHED_ORDER_LOG */ | |
+ u32 sched_order_su[]; /* HTT_TX_PDEV_NUM_SCHED_ORDER_LOG */ | |
}; | |
enum htt_sched_txq_sched_ineligibility_tlv_enum { | |
@@ -786,7 +786,7 @@ enum htt_sched_txq_sched_ineligibility_tlv_enum { | |
/* NOTE: Variable length TLV, use length spec to infer array size */ | |
struct htt_sched_txq_sched_ineligibility_tlv_v { | |
/* indexed by htt_sched_txq_sched_ineligibility_tlv_enum */ | |
- u32 sched_ineligibility[0]; | |
+ u32 sched_ineligibility[]; | |
}; | |
struct htt_tx_pdev_stats_sched_per_txq_tlv { | |
@@ -829,17 +829,17 @@ struct htt_stats_tx_sched_cmn_tlv { | |
/* NOTE: Variable length TLV, use length spec to infer array size */ | |
struct htt_tx_tqm_gen_mpdu_stats_tlv_v { | |
- u32 gen_mpdu_end_reason[0]; /* HTT_TX_TQM_MAX_GEN_MPDU_END_REASON */ | |
+ u32 gen_mpdu_end_reason[]; /* HTT_TX_TQM_MAX_GEN_MPDU_END_REASON */ | |
}; | |
/* NOTE: Variable length TLV, use length spec to infer array size */ | |
struct htt_tx_tqm_list_mpdu_stats_tlv_v { | |
- u32 list_mpdu_end_reason[0]; /* HTT_TX_TQM_MAX_LIST_MPDU_END_REASON */ | |
+ u32 list_mpdu_end_reason[]; /* HTT_TX_TQM_MAX_LIST_MPDU_END_REASON */ | |
}; | |
/* NOTE: Variable length TLV, use length spec to infer array size */ | |
struct htt_tx_tqm_list_mpdu_cnt_tlv_v { | |
- u32 list_mpdu_cnt_hist[0]; | |
+ u32 list_mpdu_cnt_hist[]; | |
/* HTT_TX_TQM_MAX_LIST_MPDU_CNT_HISTOGRAM_BINS */ | |
}; | |
@@ -1036,7 +1036,7 @@ struct htt_tx_de_compl_stats_tlv { | |
* ENTRIES_PER_BIN_COUNT) | |
*/ | |
struct htt_tx_de_fw2wbm_ring_full_hist_tlv { | |
- u32 fw2wbm_ring_full_hist[0]; | |
+ u32 fw2wbm_ring_full_hist[]; | |
}; | |
struct htt_tx_de_cmn_stats_tlv { | |
@@ -1080,7 +1080,7 @@ struct htt_ring_if_cmn_tlv { | |
/* NOTE: Variable length TLV, use length spec to infer array size */ | |
struct htt_sfm_client_user_tlv_v { | |
/* Number of DWORDS used per user and per client */ | |
- u32 dwords_used_by_user_n[0]; | |
+ u32 dwords_used_by_user_n[]; | |
}; | |
struct htt_sfm_client_tlv { | |
@@ -1335,12 +1335,12 @@ struct htt_rx_soc_fw_stats_tlv { | |
/* NOTE: Variable length TLV, use length spec to infer array size */ | |
struct htt_rx_soc_fw_refill_ring_empty_tlv_v { | |
- u32 refill_ring_empty_cnt[0]; /* HTT_RX_STATS_REFILL_MAX_RING */ | |
+ u32 refill_ring_empty_cnt[]; /* HTT_RX_STATS_REFILL_MAX_RING */ | |
}; | |
/* NOTE: Variable length TLV, use length spec to infer array size */ | |
struct htt_rx_soc_fw_refill_ring_num_refill_tlv_v { | |
- u32 refill_ring_num_refill[0]; /* HTT_RX_STATS_REFILL_MAX_RING */ | |
+ u32 refill_ring_num_refill[]; /* HTT_RX_STATS_REFILL_MAX_RING */ | |
}; | |
/* RXDMA error code from WBM released packets */ | |
@@ -1372,7 +1372,7 @@ enum htt_rx_rxdma_error_code_enum { | |
/* NOTE: Variable length TLV, use length spec to infer array size */ | |
struct htt_rx_soc_fw_refill_ring_num_rxdma_err_tlv_v { | |
- u32 rxdma_err[0]; /* HTT_RX_RXDMA_MAX_ERR_CODE */ | |
+ u32 rxdma_err[]; /* HTT_RX_RXDMA_MAX_ERR_CODE */ | |
}; | |
/* REO error code from WBM released packets */ | |
@@ -1404,7 +1404,7 @@ enum htt_rx_reo_error_code_enum { | |
/* NOTE: Variable length TLV, use length spec to infer array size */ | |
struct htt_rx_soc_fw_refill_ring_num_reo_err_tlv_v { | |
- u32 reo_err[0]; /* HTT_RX_REO_MAX_ERR_CODE */ | |
+ u32 reo_err[]; /* HTT_RX_REO_MAX_ERR_CODE */ | |
}; | |
/* == RX PDEV STATS == */ | |
@@ -1521,13 +1521,13 @@ struct htt_rx_pdev_fw_stats_phy_err_tlv { | |
/* NOTE: Variable length TLV, use length spec to infer array size */ | |
struct htt_rx_pdev_fw_ring_mpdu_err_tlv_v { | |
/* Num error MPDU for each RxDMA error type */ | |
- u32 fw_ring_mpdu_err[0]; /* HTT_RX_STATS_RXDMA_MAX_ERR */ | |
+ u32 fw_ring_mpdu_err[]; /* HTT_RX_STATS_RXDMA_MAX_ERR */ | |
}; | |
/* NOTE: Variable length TLV, use length spec to infer array size */ | |
struct htt_rx_pdev_fw_mpdu_drop_tlv_v { | |
/* Num MPDU dropped */ | |
- u32 fw_mpdu_drop[0]; /* HTT_RX_STATS_FW_DROP_REASON_MAX */ | |
+ u32 fw_mpdu_drop[]; /* HTT_RX_STATS_FW_DROP_REASON_MAX */ | |
}; | |
#define HTT_PDEV_CCA_STATS_TX_FRAME_INFO_PRESENT (0x1) | |
diff --git a/drivers/net/wireless/ath/ath11k/dp.h b/drivers/net/wireless/ath/ath11k/dp.h | |
index 7587862d2e32..693d44dd0058 100644 | |
--- a/drivers/net/wireless/ath/ath11k/dp.h | |
+++ b/drivers/net/wireless/ath/ath11k/dp.h | |
@@ -1091,12 +1091,12 @@ struct ath11k_htt_ppdu_stats_msg { | |
u32 ppdu_id; | |
u32 timestamp; | |
u32 rsvd; | |
- u8 data[0]; | |
+ u8 data[]; | |
} __packed; | |
struct htt_tlv { | |
u32 header; | |
- u8 value[0]; | |
+ u8 value[]; | |
} __packed; | |
#define HTT_TLV_TAG GENMASK(11, 0) | |
@@ -1283,7 +1283,7 @@ struct htt_ppdu_stats_usr_cmn_array { | |
* tx_ppdu_stats_info is variable length, with length = | |
* number_of_ppdu_stats * sizeof (struct htt_tx_ppdu_stats_info) | |
*/ | |
- struct htt_tx_ppdu_stats_info tx_ppdu_info[0]; | |
+ struct htt_tx_ppdu_stats_info tx_ppdu_info[]; | |
} __packed; | |
struct htt_ppdu_user_stats { | |
@@ -1345,7 +1345,7 @@ struct htt_ppdu_stats_info { | |
*/ | |
struct htt_pktlog_msg { | |
u32 hdr; | |
- u8 payload[0]; | |
+ u8 payload[]; | |
}; | |
/** | |
@@ -1566,7 +1566,7 @@ struct ath11k_htt_extd_stats_msg { | |
u32 info0; | |
u64 cookie; | |
u32 info1; | |
- u8 data[0]; | |
+ u8 data[]; | |
} __packed; | |
struct htt_mac_addr { | |
diff --git a/drivers/net/wireless/ath/ath11k/htc.h b/drivers/net/wireless/ath/ath11k/htc.h | |
index f0a3387567ca..f55b56b21c68 100644 | |
--- a/drivers/net/wireless/ath/ath11k/htc.h | |
+++ b/drivers/net/wireless/ath/ath11k/htc.h | |
@@ -161,7 +161,7 @@ struct ath11k_htc_frame { | |
struct ath11k_htc_msg msg; | |
u8 payload[0]; | |
}; | |
- struct ath11k_htc_record trailer[0]; | |
+ struct ath11k_htc_record trailer[]; | |
} __packed __aligned(4); | |
enum ath11k_htc_svc_gid { | |
diff --git a/drivers/net/wireless/ath/ath11k/rx_desc.h b/drivers/net/wireless/ath/ath11k/rx_desc.h | |
index 1c4264637a41..ef43c46cdf70 100644 | |
--- a/drivers/net/wireless/ath/ath11k/rx_desc.h | |
+++ b/drivers/net/wireless/ath/ath11k/rx_desc.h | |
@@ -1206,7 +1206,7 @@ struct hal_rx_desc { | |
__le32 hdr_status_tag; | |
__le32 phy_ppdu_id; | |
u8 hdr_status[HAL_RX_DESC_HDR_STATUS_LEN]; | |
- u8 msdu_payload[0]; | |
+ u8 msdu_payload[]; | |
} __packed; | |
#define HAL_RX_RU_ALLOC_TYPE_MAX 6 | |
diff --git a/drivers/net/wireless/ath/ath11k/spectral.c b/drivers/net/wireless/ath/ath11k/spectral.c | |
index 1c5d65bb411f..7626ed0a7cc9 100644 | |
--- a/drivers/net/wireless/ath/ath11k/spectral.c | |
+++ b/drivers/net/wireless/ath/ath11k/spectral.c | |
@@ -111,7 +111,7 @@ struct spectral_search_fft_report { | |
__le32 info1; | |
__le32 info2; | |
__le32 reserve0; | |
- u8 bins[0]; | |
+ u8 bins[]; | |
} __packed; | |
struct ath11k_spectral_search_report { | |
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h | |
index 784940ba4c90..8535784af513 100644 | |
--- a/drivers/net/wireless/ath/ath6kl/wmi.h | |
+++ b/drivers/net/wireless/ath/ath6kl/wmi.h | |
@@ -1637,7 +1637,7 @@ struct bss_bias { | |
struct bss_bias_info { | |
u8 num_bss; | |
- struct bss_bias bss_bias[0]; | |
+ struct bss_bias bss_bias[]; | |
} __packed; | |
struct low_rssi_scan_params { | |
@@ -1720,7 +1720,7 @@ struct wmi_neighbor_info { | |
struct wmi_neighbor_report_event { | |
u8 num_neighbors; | |
- struct wmi_neighbor_info neighbor[0]; | |
+ struct wmi_neighbor_info neighbor[]; | |
} __packed; | |
/* TKIP MIC Error Event */ | |
@@ -2051,7 +2051,7 @@ struct wmi_get_keepalive_cmd { | |
struct wmi_set_appie_cmd { | |
u8 mgmt_frm_type; /* enum wmi_mgmt_frame_type */ | |
u8 ie_len; | |
- u8 ie_info[0]; | |
+ u8 ie_info[]; | |
} __packed; | |
struct wmi_set_ie_cmd { | |
@@ -2059,7 +2059,7 @@ struct wmi_set_ie_cmd { | |
u8 ie_field; /* enum wmi_ie_field_type */ | |
u8 ie_len; | |
u8 reserved; | |
- u8 ie_info[0]; | |
+ u8 ie_info[]; | |
} __packed; | |
/* Notify the WSC registration status to the target */ | |
@@ -2127,7 +2127,7 @@ struct wmi_add_wow_pattern_cmd { | |
u8 filter_list_id; | |
u8 filter_size; | |
u8 filter_offset; | |
- u8 filter[0]; | |
+ u8 filter[]; | |
} __packed; | |
struct wmi_del_wow_pattern_cmd { | |
@@ -2360,7 +2360,7 @@ struct wmi_send_action_cmd { | |
__le32 freq; | |
__le32 wait; | |
__le16 len; | |
- u8 data[0]; | |
+ u8 data[]; | |
} __packed; | |
struct wmi_send_mgmt_cmd { | |
@@ -2369,7 +2369,7 @@ struct wmi_send_mgmt_cmd { | |
__le32 wait; | |
__le32 no_cck; | |
__le16 len; | |
- u8 data[0]; | |
+ u8 data[]; | |
} __packed; | |
struct wmi_tx_status_event { | |
@@ -2389,7 +2389,7 @@ struct wmi_set_appie_extended_cmd { | |
u8 role_id; | |
u8 mgmt_frm_type; | |
u8 ie_len; | |
- u8 ie_info[0]; | |
+ u8 ie_info[]; | |
} __packed; | |
struct wmi_remain_on_chnl_event { | |
@@ -2406,18 +2406,18 @@ struct wmi_cancel_remain_on_chnl_event { | |
struct wmi_rx_action_event { | |
__le32 freq; | |
__le16 len; | |
- u8 data[0]; | |
+ u8 data[]; | |
} __packed; | |
struct wmi_p2p_capabilities_event { | |
__le16 len; | |
- u8 data[0]; | |
+ u8 data[]; | |
} __packed; | |
struct wmi_p2p_rx_probe_req_event { | |
__le32 freq; | |
__le16 len; | |
- u8 data[0]; | |
+ u8 data[]; | |
} __packed; | |
#define P2P_FLAG_CAPABILITIES_REQ (0x00000001) | |
@@ -2431,7 +2431,7 @@ struct wmi_get_p2p_info { | |
struct wmi_p2p_info_event { | |
__le32 info_req_flags; | |
__le16 len; | |
- u8 data[0]; | |
+ u8 data[]; | |
} __packed; | |
struct wmi_p2p_capabilities { | |
@@ -2450,7 +2450,7 @@ struct wmi_p2p_probe_response_cmd { | |
__le32 freq; | |
u8 destination_addr[ETH_ALEN]; | |
__le16 len; | |
- u8 data[0]; | |
+ u8 data[]; | |
} __packed; | |
/* Extended WMI (WMIX) | |
diff --git a/drivers/net/wireless/ath/carl9170/fwcmd.h b/drivers/net/wireless/ath/carl9170/fwcmd.h | |
index 56999a3b9d3b..915973f88795 100644 | |
--- a/drivers/net/wireless/ath/carl9170/fwcmd.h | |
+++ b/drivers/net/wireless/ath/carl9170/fwcmd.h | |
@@ -110,18 +110,18 @@ struct carl9170_disable_key_cmd { | |
#define CARL9170_DISABLE_KEY_CMD_SIZE 4 | |
struct carl9170_u32_list { | |
- u32 vals[0]; | |
+ u32 vals[]; | |
} __packed; | |
struct carl9170_reg_list { | |
- __le32 regs[0]; | |
+ __le32 regs[]; | |
} __packed; | |
struct carl9170_write_reg { | |
struct { | |
__le32 addr; | |
__le32 val; | |
- } regs[0] __packed; | |
+ } regs[] __packed; | |
} __packed; | |
struct carl9170_write_reg_byte { | |
diff --git a/drivers/net/wireless/ath/carl9170/fwdesc.h b/drivers/net/wireless/ath/carl9170/fwdesc.h | |
index 503b21abbba5..10acb6ad30d0 100644 | |
--- a/drivers/net/wireless/ath/carl9170/fwdesc.h | |
+++ b/drivers/net/wireless/ath/carl9170/fwdesc.h | |
@@ -149,7 +149,7 @@ struct carl9170fw_fix_entry { | |
struct carl9170fw_fix_desc { | |
struct carl9170fw_desc_head head; | |
- struct carl9170fw_fix_entry data[0]; | |
+ struct carl9170fw_fix_entry data[]; | |
} __packed; | |
#define CARL9170FW_FIX_DESC_SIZE \ | |
(sizeof(struct carl9170fw_fix_desc)) | |
diff --git a/drivers/net/wireless/ath/carl9170/wlan.h b/drivers/net/wireless/ath/carl9170/wlan.h | |
index ea17995b32f4..54a6fbfc77cf 100644 | |
--- a/drivers/net/wireless/ath/carl9170/wlan.h | |
+++ b/drivers/net/wireless/ath/carl9170/wlan.h | |
@@ -327,7 +327,7 @@ struct _carl9170_tx_superdesc { | |
struct _carl9170_tx_superframe { | |
struct _carl9170_tx_superdesc s; | |
struct _ar9170_tx_hwdesc f; | |
- u8 frame_data[0]; | |
+ u8 frame_data[]; | |
} __packed __aligned(4); | |
#define CARL9170_TX_SUPERDESC_LEN 24 | |
diff --git a/drivers/net/wireless/ath/spectral_common.h b/drivers/net/wireless/ath/spectral_common.h | |
index 9c2e5458e425..f8f9f86cb280 100644 | |
--- a/drivers/net/wireless/ath/spectral_common.h | |
+++ b/drivers/net/wireless/ath/spectral_common.h | |
@@ -109,7 +109,7 @@ struct fft_sample_ath10k { | |
u8 avgpwr_db; | |
u8 max_exp; | |
- u8 data[0]; | |
+ u8 data[]; | |
} __packed; | |
struct fft_sample_ath11k { | |
@@ -124,7 +124,7 @@ struct fft_sample_ath11k { | |
__be32 tsf; | |
__be32 noise; | |
- u8 data[0]; | |
+ u8 data[]; | |
} __packed; | |
#endif /* SPECTRAL_COMMON_H */ | |
diff --git a/drivers/net/wireless/ath/wil6210/fw.h b/drivers/net/wireless/ath/wil6210/fw.h | |
index 440614d61156..d070df8cdec3 100644 | |
--- a/drivers/net/wireless/ath/wil6210/fw.h | |
+++ b/drivers/net/wireless/ath/wil6210/fw.h | |
@@ -47,7 +47,7 @@ struct wil_fw_record_fill { /* type == wil_fw_type_fill */ | |
* for informational purpose, data_size is @head.size from record header | |
*/ | |
struct wil_fw_record_comment { /* type == wil_fw_type_comment */ | |
- u8 data[0]; /* free-form data [data_size], see above */ | |
+ u8 data[]; /* free-form data [data_size], see above */ | |
} __packed; | |
/* Comment header - common for all comment record types */ | |
@@ -131,7 +131,7 @@ struct wil_fw_data_dwrite { | |
* data_size is @head.size where @head is record header | |
*/ | |
struct wil_fw_record_direct_write { /* type == wil_fw_type_direct_write */ | |
- struct wil_fw_data_dwrite data[0]; | |
+ struct wil_fw_data_dwrite data[]; | |
} __packed; | |
/* verify condition: [@addr] & @mask == @value | |
diff --git a/drivers/net/wireless/ath/wil6210/wmi.h b/drivers/net/wireless/ath/wil6210/wmi.h | |
index 9affa4525609..c42ea5c7b465 100644 | |
--- a/drivers/net/wireless/ath/wil6210/wmi.h | |
+++ b/drivers/net/wireless/ath/wil6210/wmi.h | |
@@ -2763,7 +2763,7 @@ struct wmi_rf_xpm_write_result_event { | |
/* WMI_TX_MGMT_PACKET_EVENTID */ | |
struct wmi_tx_mgmt_packet_event { | |
- u8 payload[0]; | |
+ u8 payload[]; | |
} __packed; | |
/* WMI_RX_MGMT_PACKET_EVENTID */ | |
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/dbg-tlv.h b/drivers/net/wireless/intel/iwlwifi/fw/api/dbg-tlv.h | |
index 74ac65bd545a..ad5f896f61da 100644 | |
--- a/drivers/net/wireless/intel/iwlwifi/fw/api/dbg-tlv.h | |
+++ b/drivers/net/wireless/intel/iwlwifi/fw/api/dbg-tlv.h | |
@@ -77,7 +77,7 @@ struct iwl_fw_ini_hcmd { | |
u8 id; | |
u8 group; | |
__le16 reserved; | |
- u8 data[0]; | |
+ u8 data[]; | |
} __packed; /* FW_DEBUG_TLV_HCMD_DATA_API_S_VER_1 */ | |
/** | |
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/debug.h b/drivers/net/wireless/intel/iwlwifi/fw/api/debug.h | |
index 94b1a1268476..0e9b7abceae7 100644 | |
--- a/drivers/net/wireless/intel/iwlwifi/fw/api/debug.h | |
+++ b/drivers/net/wireless/intel/iwlwifi/fw/api/debug.h | |
@@ -268,7 +268,7 @@ struct iwl_mfu_assert_dump_notif { | |
__le16 index_num; | |
__le16 parts_num; | |
__le32 data_size; | |
- __le32 data[0]; | |
+ __le32 data[]; | |
} __packed; /* MFU_DUMP_ASSERT_API_S_VER_1 */ | |
/** | |
@@ -304,7 +304,7 @@ struct iwl_mvm_marker { | |
u8 marker_id; | |
__le16 reserved; | |
__le64 timestamp; | |
- __le32 metadata[0]; | |
+ __le32 metadata[]; | |
} __packed; /* MARKER_API_S_VER_1 */ | |
/** | |
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/filter.h b/drivers/net/wireless/intel/iwlwifi/fw/api/filter.h | |
index befc3b126041..a4064a6fb4d1 100644 | |
--- a/drivers/net/wireless/intel/iwlwifi/fw/api/filter.h | |
+++ b/drivers/net/wireless/intel/iwlwifi/fw/api/filter.h | |
@@ -89,7 +89,7 @@ struct iwl_mcast_filter_cmd { | |
u8 pass_all; | |
u8 bssid[6]; | |
u8 reserved[2]; | |
- u8 addr_list[0]; | |
+ u8 addr_list[]; | |
} __packed; /* MCAST_FILTERING_CMD_API_S_VER_1 */ | |
#define MAX_BCAST_FILTERS 8 | |
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/scan.h b/drivers/net/wireless/intel/iwlwifi/fw/api/scan.h | |
index 5cc33a1b7172..9ddbd7210c89 100644 | |
--- a/drivers/net/wireless/intel/iwlwifi/fw/api/scan.h | |
+++ b/drivers/net/wireless/intel/iwlwifi/fw/api/scan.h | |
@@ -1162,7 +1162,7 @@ struct iwl_scan_offload_profiles_query_v1 { | |
u8 resume_while_scanning; | |
u8 self_recovery; | |
__le16 reserved; | |
- struct iwl_scan_offload_profile_match_v1 matches[0]; | |
+ struct iwl_scan_offload_profile_match_v1 matches[]; | |
} __packed; /* SCAN_OFFLOAD_PROFILES_QUERY_RSP_S_VER_2 */ | |
/** | |
@@ -1206,7 +1206,7 @@ struct iwl_scan_offload_profiles_query { | |
u8 resume_while_scanning; | |
u8 self_recovery; | |
__le16 reserved; | |
- struct iwl_scan_offload_profile_match matches[0]; | |
+ struct iwl_scan_offload_profile_match matches[]; | |
} __packed; /* SCAN_OFFLOAD_PROFILES_QUERY_RSP_S_VER_3 */ | |
/** | |
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/sta.h b/drivers/net/wireless/intel/iwlwifi/fw/api/sta.h | |
index c010e6febbf4..208b12c76b30 100644 | |
--- a/drivers/net/wireless/intel/iwlwifi/fw/api/sta.h | |
+++ b/drivers/net/wireless/intel/iwlwifi/fw/api/sta.h | |
@@ -526,7 +526,7 @@ struct iwl_mvm_wep_key_cmd { | |
u8 decryption_type; | |
u8 flags; | |
u8 reserved; | |
- struct iwl_mvm_wep_key wep_key[0]; | |
+ struct iwl_mvm_wep_key wep_key[]; | |
} __packed; /* SEC_CURR_WEP_KEY_CMD_API_S_VER_2 */ | |
/** | |
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/tdls.h b/drivers/net/wireless/intel/iwlwifi/fw/api/tdls.h | |
index b089285ac466..ec2a00d6c684 100644 | |
--- a/drivers/net/wireless/intel/iwlwifi/fw/api/tdls.h | |
+++ b/drivers/net/wireless/intel/iwlwifi/fw/api/tdls.h | |
@@ -190,7 +190,7 @@ struct iwl_tdls_config_cmd { | |
__le32 pti_req_data_offset; | |
struct iwl_tx_cmd pti_req_tx_cmd; | |
- u8 pti_req_template[0]; | |
+ u8 pti_req_template[]; | |
} __packed; /* TDLS_CONFIG_CMD_API_S_VER_1 */ | |
/** | |
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/error-dump.h b/drivers/net/wireless/intel/iwlwifi/fw/error-dump.h | |
index 72bfc64580ab..9213c6839969 100644 | |
--- a/drivers/net/wireless/intel/iwlwifi/fw/error-dump.h | |
+++ b/drivers/net/wireless/intel/iwlwifi/fw/error-dump.h | |
@@ -141,7 +141,7 @@ struct iwl_fw_error_dump_data { | |
struct iwl_fw_error_dump_file { | |
__le32 barker; | |
__le32 file_len; | |
- u8 data[0]; | |
+ u8 data[]; | |
} __packed; | |
/** | |
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/file.h b/drivers/net/wireless/intel/iwlwifi/fw/file.h | |
index 1fb45fd30ffa..7ae3c5f4563f 100644 | |
--- a/drivers/net/wireless/intel/iwlwifi/fw/file.h | |
+++ b/drivers/net/wireless/intel/iwlwifi/fw/file.h | |
@@ -161,7 +161,7 @@ enum iwl_ucode_tlv_type { | |
struct iwl_ucode_tlv { | |
__le32 type; /* see above */ | |
__le32 length; /* not including type/length fields */ | |
- u8 data[0]; | |
+ u8 data[]; | |
}; | |
#define IWL_TLV_UCODE_MAGIC 0x0a4c5749 | |
@@ -187,7 +187,7 @@ struct iwl_tlv_ucode_header { | |
* Note that each TLV is padded to a length | |
* that is a multiple of 4 for alignment. | |
*/ | |
- u8 data[0]; | |
+ u8 data[]; | |
}; | |
/* | |
@@ -652,7 +652,7 @@ struct iwl_fw_dbg_dest_tlv_v1 { | |
__le32 wrap_count; | |
u8 base_shift; | |
u8 end_shift; | |
- struct iwl_fw_dbg_reg_op reg_ops[0]; | |
+ struct iwl_fw_dbg_reg_op reg_ops[]; | |
} __packed; | |
/* Mask of the register for defining the LDBG MAC2SMEM buffer SMEM size */ | |
@@ -672,14 +672,14 @@ struct iwl_fw_dbg_dest_tlv { | |
__le32 wrap_count; | |
u8 base_shift; | |
u8 size_shift; | |
- struct iwl_fw_dbg_reg_op reg_ops[0]; | |
+ struct iwl_fw_dbg_reg_op reg_ops[]; | |
} __packed; | |
struct iwl_fw_dbg_conf_hcmd { | |
u8 id; | |
u8 reserved; | |
__le16 len; | |
- u8 data[0]; | |
+ u8 data[]; | |
} __packed; | |
/** | |
@@ -754,7 +754,7 @@ struct iwl_fw_dbg_trigger_tlv { | |
u8 flags; | |
u8 reserved[5]; | |
- u8 data[0]; | |
+ u8 data[]; | |
} __packed; | |
#define FW_DBG_START_FROM_ALIVE 0 | |
diff --git a/drivers/net/wireless/intersil/p54/eeprom.h b/drivers/net/wireless/intersil/p54/eeprom.h | |
index 1d0aaf54389a..981d3b25b39a 100644 | |
--- a/drivers/net/wireless/intersil/p54/eeprom.h | |
+++ b/drivers/net/wireless/intersil/p54/eeprom.h | |
@@ -111,7 +111,7 @@ struct pda_antenna_gain { | |
struct { | |
u8 gain_5GHz; /* 0.25 dBi units */ | |
u8 gain_2GHz; /* 0.25 dBi units */ | |
- } __packed antenna[0]; | |
+ } __packed antenna[]; | |
} __packed; | |
struct pda_custom_wrapper { | |
diff --git a/drivers/net/wireless/microchip/wilc1000/fw.h b/drivers/net/wireless/microchip/wilc1000/fw.h | |
index a76e1dea4345..1114530d03e4 100644 | |
--- a/drivers/net/wireless/microchip/wilc1000/fw.h | |
+++ b/drivers/net/wireless/microchip/wilc1000/fw.h | |
@@ -44,20 +44,20 @@ struct wilc_drv_handler { | |
struct wilc_wep_key { | |
u8 index; | |
u8 key_len; | |
- u8 key[0]; | |
+ u8 key[]; | |
} __packed; | |
struct wilc_sta_wpa_ptk { | |
u8 mac_addr[ETH_ALEN]; | |
u8 key_len; | |
- u8 key[0]; | |
+ u8 key[]; | |
} __packed; | |
struct wilc_ap_wpa_ptk { | |
u8 mac_addr[ETH_ALEN]; | |
u8 index; | |
u8 key_len; | |
- u8 key[0]; | |
+ u8 key[]; | |
} __packed; | |
struct wilc_gtk_key { | |
@@ -65,7 +65,7 @@ struct wilc_gtk_key { | |
u8 rsc[8]; | |
u8 index; | |
u8 key_len; | |
- u8 key[0]; | |
+ u8 key[]; | |
} __packed; | |
struct wilc_op_mode { | |
diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h | |
index 13421cf2d201..087510023c22 100644 | |
--- a/drivers/net/wireless/realtek/rtlwifi/wifi.h | |
+++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h | |
@@ -2833,7 +2833,7 @@ struct rtl_priv { | |
* beyond this structure like: | |
* rtl_pci_priv or rtl_usb_priv | |
*/ | |
- u8 priv[0] __aligned(sizeof(void *)); | |
+ u8 priv[] __aligned(sizeof(void *)); | |
}; | |
#define rtl_priv(hw) (((struct rtl_priv *)(hw)->priv)) | |
diff --git a/drivers/s390/char/sclp.h b/drivers/s390/char/sclp.h | |
index 196333013e54..af2b6a07433c 100644 | |
--- a/drivers/s390/char/sclp.h | |
+++ b/drivers/s390/char/sclp.h | |
@@ -208,7 +208,7 @@ struct read_storage_sccb { | |
u16 assigned; | |
u16 standby; | |
u16 :16; | |
- u32 entries[0]; | |
+ u32 entries[]; | |
} __packed; | |
static inline void sclp_fill_core_info(struct sclp_core_info *info, | |
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c | |
index a864b21af602..7d204727aee5 100644 | |
--- a/drivers/s390/char/sclp_cmd.c | |
+++ b/drivers/s390/char/sclp_cmd.c | |
@@ -240,7 +240,7 @@ struct attach_storage_sccb { | |
u16 :16; | |
u16 assigned; | |
u32 :32; | |
- u32 entries[0]; | |
+ u32 entries[]; | |
} __packed; | |
static int sclp_attach_storage(u8 id) | |
diff --git a/drivers/s390/cio/chsc.h b/drivers/s390/cio/chsc.h | |
index 7ecf7e4c402e..5da8379a4a2d 100644 | |
--- a/drivers/s390/cio/chsc.h | |
+++ b/drivers/s390/cio/chsc.h | |
@@ -119,7 +119,7 @@ struct chsc_scpd { | |
u32 zeroes1; | |
struct chsc_header response; | |
u32:32; | |
- u8 data[0]; | |
+ u8 data[]; | |
} __packed __aligned(PAGE_SIZE); | |
struct chsc_sda_area { | |
diff --git a/drivers/scsi/dpt/dpti_i2o.h b/drivers/scsi/dpt/dpti_i2o.h | |
index bf0daeeb50a9..e1fbbf55c09d 100644 | |
--- a/drivers/scsi/dpt/dpti_i2o.h | |
+++ b/drivers/scsi/dpt/dpti_i2o.h | |
@@ -123,7 +123,7 @@ struct i2o_sys_tbl | |
u32 change_ind; | |
u32 reserved2; | |
u32 reserved3; | |
- struct i2o_sys_tbl_entry iops[0]; | |
+ struct i2o_sys_tbl_entry iops[]; | |
}; | |
/* | |
diff --git a/drivers/scsi/qla2xxx/qla_bsg.h b/drivers/scsi/qla2xxx/qla_bsg.h | |
index 7594fad7b5b5..cdf5c66bfbea 100644 | |
--- a/drivers/scsi/qla2xxx/qla_bsg.h | |
+++ b/drivers/scsi/qla2xxx/qla_bsg.h | |
@@ -151,7 +151,7 @@ struct qla84_msg_mgmt { | |
uint16_t rsrvd; | |
struct qla84_mgmt_param mgmtp;/* parameters for cmd */ | |
uint32_t len; /* bytes in payload following this struct */ | |
- uint8_t payload[0]; /* payload for cmd */ | |
+ uint8_t payload[]; /* payload for cmd */ | |
}; | |
struct qla_bsg_a84_mgmt { | |
@@ -204,7 +204,7 @@ struct qla_image_version { | |
struct qla_image_version_list { | |
uint32_t count; | |
- struct qla_image_version version[0]; | |
+ struct qla_image_version version[]; | |
} __packed; | |
struct qla_status_reg { | |
diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h | |
index bba1b77fba7e..06447e1754be 100644 | |
--- a/drivers/scsi/qla2xxx/qla_fw.h | |
+++ b/drivers/scsi/qla2xxx/qla_fw.h | |
@@ -1679,7 +1679,7 @@ struct qla_flt_header { | |
__le16 length; | |
__le16 checksum; | |
__le16 unused; | |
- struct qla_flt_region region[0]; | |
+ struct qla_flt_region region[]; | |
}; | |
#define FLT_REGION_SIZE 16 | |
diff --git a/drivers/scsi/qla4xxx/ql4_fw.h b/drivers/scsi/qla4xxx/ql4_fw.h | |
index 699575efc9ba..edc90abaaebc 100644 | |
--- a/drivers/scsi/qla4xxx/ql4_fw.h | |
+++ b/drivers/scsi/qla4xxx/ql4_fw.h | |
@@ -1029,7 +1029,7 @@ struct crash_record { | |
uint8_t out_RISC_reg_dump[256]; /* 80 -17F */ | |
uint8_t in_RISC_reg_dump[256]; /*180 -27F */ | |
- uint8_t in_out_RISC_stack_dump[0]; /*280 - ??? */ | |
+ uint8_t in_out_RISC_stack_dump[]; /*280 - ??? */ | |
}; | |
struct conn_event_log_entry { | |
diff --git a/drivers/staging/greybus/usb.c b/drivers/staging/greybus/usb.c | |
index 8e9d9d59a357..5034de90ec65 100644 | |
--- a/drivers/staging/greybus/usb.c | |
+++ b/drivers/staging/greybus/usb.c | |
@@ -27,7 +27,7 @@ struct gb_usb_hub_control_request { | |
}; | |
struct gb_usb_hub_control_response { | |
- u8 buf[0]; | |
+ u8 buf[]; | |
}; | |
struct gb_usb_device { | |
diff --git a/drivers/staging/rtl8188eu/include/ieee80211.h b/drivers/staging/rtl8188eu/include/ieee80211.h | |
index 83218e7ec0a9..f8a6ccf189ea 100644 | |
--- a/drivers/staging/rtl8188eu/include/ieee80211.h | |
+++ b/drivers/staging/rtl8188eu/include/ieee80211.h | |
@@ -235,7 +235,7 @@ struct ieee_param { | |
struct ieee_param_ex { | |
u32 cmd; | |
u8 sta_addr[ETH_ALEN]; | |
- u8 data[0]; | |
+ u8 data[]; | |
}; | |
struct sta_data { | |
diff --git a/drivers/staging/rtl8712/rtl871x_cmd.h b/drivers/staging/rtl8712/rtl871x_cmd.h | |
index 254182a6ce8e..1a3f8ef031a5 100644 | |
--- a/drivers/staging/rtl8712/rtl871x_cmd.h | |
+++ b/drivers/staging/rtl8712/rtl871x_cmd.h | |
@@ -647,25 +647,25 @@ struct setra_parm { | |
struct setprobereqextraie_parm { | |
unsigned char e_id; | |
unsigned char ie_len; | |
- unsigned char ie[0]; | |
+ unsigned char ie[]; | |
}; | |
struct setassocreqextraie_parm { | |
unsigned char e_id; | |
unsigned char ie_len; | |
- unsigned char ie[0]; | |
+ unsigned char ie[]; | |
}; | |
struct setproberspextraie_parm { | |
unsigned char e_id; | |
unsigned char ie_len; | |
- unsigned char ie[0]; | |
+ unsigned char ie[]; | |
}; | |
struct setassocrspextraie_parm { | |
unsigned char e_id; | |
unsigned char ie_len; | |
- unsigned char ie[0]; | |
+ unsigned char ie[]; | |
}; | |
struct addBaReq_parm { | |
diff --git a/drivers/staging/rtl8723bs/include/hal_intf.h b/drivers/staging/rtl8723bs/include/hal_intf.h | |
index 1de5acaef8ff..100d965b3476 100644 | |
--- a/drivers/staging/rtl8723bs/include/hal_intf.h | |
+++ b/drivers/staging/rtl8723bs/include/hal_intf.h | |
@@ -301,7 +301,7 @@ struct wowlan_ioctl_param { | |
unsigned int subcode_value; | |
unsigned int wakeup_reason; | |
unsigned int len; | |
- unsigned char pattern[0]; | |
+ unsigned char pattern[]; | |
}; | |
#define Rx_Pairwisekey 0x01 | |
diff --git a/drivers/staging/rtl8723bs/include/ieee80211.h b/drivers/staging/rtl8723bs/include/ieee80211.h | |
index b7c4b1cf204e..d8de6eb3d37f 100644 | |
--- a/drivers/staging/rtl8723bs/include/ieee80211.h | |
+++ b/drivers/staging/rtl8723bs/include/ieee80211.h | |
@@ -244,7 +244,7 @@ struct ieee_param { | |
struct ieee_param_ex { | |
u32 cmd; | |
u8 sta_addr[ETH_ALEN]; | |
- u8 data[0]; | |
+ u8 data[]; | |
}; | |
struct sta_data { | |
@@ -690,7 +690,7 @@ struct ieee80211_info_element_hdr { | |
struct ieee80211_info_element { | |
u8 id; | |
u8 len; | |
- u8 data[0]; | |
+ u8 data[]; | |
} __attribute__ ((packed)); | |
/* | |
@@ -757,7 +757,7 @@ struct ieee80211_txb { | |
u16 reserved; | |
u16 frag_size; | |
u16 payload_size; | |
- struct sk_buff *fragments[0]; | |
+ struct sk_buff *fragments[]; | |
}; | |
diff --git a/drivers/staging/rtl8723bs/include/osdep_service.h b/drivers/staging/rtl8723bs/include/osdep_service.h | |
index be34e279670b..ea48f0466445 100644 | |
--- a/drivers/staging/rtl8723bs/include/osdep_service.h | |
+++ b/drivers/staging/rtl8723bs/include/osdep_service.h | |
@@ -244,7 +244,7 @@ struct rtw_cbuf { | |
u32 write; | |
u32 read; | |
u32 size; | |
- void *bufs[0]; | |
+ void *bufs[]; | |
}; | |
bool rtw_cbuf_full(struct rtw_cbuf *cbuf); | |
diff --git a/drivers/staging/rtl8723bs/include/rtw_cmd.h b/drivers/staging/rtl8723bs/include/rtw_cmd.h | |
index 56c77bc7ca81..9f5c1a62b888 100644 | |
--- a/drivers/staging/rtl8723bs/include/rtw_cmd.h | |
+++ b/drivers/staging/rtl8723bs/include/rtw_cmd.h | |
@@ -94,7 +94,7 @@ struct c2h_evt_hdr { | |
u8 id:4; | |
u8 plen:4; | |
u8 seq; | |
- u8 payload[0]; | |
+ u8 payload[]; | |
}; | |
struct c2h_evt_hdr_88xx { | |
@@ -729,25 +729,25 @@ struct getcurtxpwrlevel_rsp { | |
struct setprobereqextraie_parm { | |
unsigned char e_id; | |
unsigned char ie_len; | |
- unsigned char ie[0]; | |
+ unsigned char ie[]; | |
}; | |
struct setassocreqextraie_parm { | |
unsigned char e_id; | |
unsigned char ie_len; | |
- unsigned char ie[0]; | |
+ unsigned char ie[]; | |
}; | |
struct setproberspextraie_parm { | |
unsigned char e_id; | |
unsigned char ie_len; | |
- unsigned char ie[0]; | |
+ unsigned char ie[]; | |
}; | |
struct setassocrspextraie_parm { | |
unsigned char e_id; | |
unsigned char ie_len; | |
- unsigned char ie[0]; | |
+ unsigned char ie[]; | |
}; | |
diff --git a/drivers/staging/vc04_services/include/linux/raspberrypi/vchiq.h b/drivers/staging/vc04_services/include/linux/raspberrypi/vchiq.h | |
index 18d63df368c4..3850829b115b 100644 | |
--- a/drivers/staging/vc04_services/include/linux/raspberrypi/vchiq.h | |
+++ b/drivers/staging/vc04_services/include/linux/raspberrypi/vchiq.h | |
@@ -45,7 +45,7 @@ struct vchiq_header { | |
/* Size of message data. */ | |
unsigned int size; | |
- char data[0]; /* message */ | |
+ char data[]; /* message */ | |
}; | |
struct vchiq_element { | |
diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h | |
index 88e894dd3568..3afbd7deda1f 100644 | |
--- a/drivers/staging/wlan-ng/hfa384x.h | |
+++ b/drivers/staging/wlan-ng/hfa384x.h | |
@@ -973,15 +973,15 @@ struct hfa384x_pdr_nicid { | |
} __packed; | |
struct hfa384x_pdr_refdac_measurements { | |
- u16 value[0]; | |
+ u16 value[]; | |
} __packed; | |
struct hfa384x_pdr_vgdac_measurements { | |
- u16 value[0]; | |
+ u16 value[]; | |
} __packed; | |
struct hfa384x_pdr_level_comp_measurements { | |
- u16 value[0]; | |
+ u16 value[]; | |
} __packed; | |
struct hfa384x_pdr_mac_address { | |
diff --git a/drivers/target/target_core_pscsi.h b/drivers/target/target_core_pscsi.h | |
index e8458b5e85c9..65dec8638841 100644 | |
--- a/drivers/target/target_core_pscsi.h | |
+++ b/drivers/target/target_core_pscsi.h | |
@@ -24,7 +24,7 @@ struct scsi_device; | |
struct Scsi_Host; | |
struct pscsi_plugin_task { | |
- unsigned char pscsi_cdb[0]; | |
+ unsigned char pscsi_cdb[]; | |
} ____cacheline_aligned; | |
#define PDF_HAS_CHANNEL_ID 0x01 | |
diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c | |
index 9b7592350502..806021ed4e52 100644 | |
--- a/drivers/target/target_core_user.c | |
+++ b/drivers/target/target_core_user.c | |
@@ -191,7 +191,7 @@ struct tcmu_tmr { | |
uint8_t tmr_type; | |
uint32_t tmr_cmd_cnt; | |
- int16_t tmr_cmd_ids[0]; | |
+ int16_t tmr_cmd_ids[]; | |
}; | |
/* | |
diff --git a/drivers/tee/optee/optee_msg.h b/drivers/tee/optee/optee_msg.h | |
index 795bc19ae17a..93f78d579c06 100644 | |
--- a/drivers/tee/optee/optee_msg.h | |
+++ b/drivers/tee/optee/optee_msg.h | |
@@ -199,7 +199,7 @@ struct optee_msg_arg { | |
u32 num_params; | |
/* num_params tells the actual number of element in params */ | |
- struct optee_msg_param params[0]; | |
+ struct optee_msg_param params[]; | |
}; | |
/** | |
diff --git a/drivers/thunderbolt/tb_msgs.h b/drivers/thunderbolt/tb_msgs.h | |
index fc208c567953..856964164692 100644 | |
--- a/drivers/thunderbolt/tb_msgs.h | |
+++ b/drivers/thunderbolt/tb_msgs.h | |
@@ -532,7 +532,7 @@ struct tb_xdp_properties_response { | |
u16 offset; | |
u16 data_length; | |
u32 generation; | |
- u32 data[0]; | |
+ u32 data[]; | |
}; | |
/* | |
diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c | |
index 8434bd5a8ec7..1a45d673d33c 100644 | |
--- a/drivers/tty/serial/max310x.c | |
+++ b/drivers/tty/serial/max310x.c | |
@@ -273,7 +273,7 @@ struct max310x_port { | |
#ifdef CONFIG_GPIOLIB | |
struct gpio_chip gpio; | |
#endif | |
- struct max310x_one p[0]; | |
+ struct max310x_one p[]; | |
}; | |
static struct uart_driver max310x_uart = { | |
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c | |
index ccb533fd00a2..2fead53654f7 100644 | |
--- a/drivers/tty/vt/vt.c | |
+++ b/drivers/tty/vt/vt.c | |
@@ -331,7 +331,7 @@ typedef uint32_t char32_t; | |
* scrolling only implies some pointer shuffling. | |
*/ | |
struct uni_screen { | |
- char32_t *lines[0]; | |
+ char32_t *lines[]; | |
}; | |
static struct uni_screen *vc_uniscr_alloc(unsigned int cols, unsigned int rows) | |
diff --git a/drivers/visorbus/vbuschannel.h b/drivers/visorbus/vbuschannel.h | |
index 4aaf6564eb9f..98711fb6d66e 100644 | |
--- a/drivers/visorbus/vbuschannel.h | |
+++ b/drivers/visorbus/vbuschannel.h | |
@@ -89,7 +89,7 @@ struct visor_vbus_channel { | |
struct visor_vbus_headerinfo hdr_info; | |
struct visor_vbus_deviceinfo chp_info; | |
struct visor_vbus_deviceinfo bus_info; | |
- struct visor_vbus_deviceinfo dev_info[0]; | |
+ struct visor_vbus_deviceinfo dev_info[]; | |
} __packed; | |
#endif | |
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c | |
index 13d053982dd7..635f6a01fd2d 100644 | |
--- a/fs/binfmt_elf.c | |
+++ b/fs/binfmt_elf.c | |
@@ -1782,7 +1782,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 { | |
diff --git a/fs/erofs/erofs_fs.h b/fs/erofs/erofs_fs.h | |
index 9ad1615f4474..c80a1b1208dc 100644 | |
--- a/fs/erofs/erofs_fs.h | |
+++ b/fs/erofs/erofs_fs.h | |
@@ -152,7 +152,7 @@ struct erofs_xattr_ibody_header { | |
__le32 h_reserved; | |
__u8 h_shared_count; | |
__u8 h_reserved2[7]; | |
- __le32 h_shared_xattrs[0]; /* shared xattr id array */ | |
+ __le32 h_shared_xattrs[]; /* shared xattr id array */ | |
}; | |
/* Name indexes */ | |
@@ -169,7 +169,7 @@ struct erofs_xattr_entry { | |
__u8 e_name_index; /* attribute name index */ | |
__le16 e_value_size; /* size of attribute value */ | |
/* followed by e_name and e_value */ | |
- char e_name[0]; /* attribute name */ | |
+ char e_name[]; /* attribute name */ | |
}; | |
static inline unsigned int erofs_xattr_ibody_size(__le16 i_xattr_icount) | |
diff --git a/fs/hfs/btree.h b/fs/hfs/btree.h | |
index dcc2aab1b2c4..4ba45caf5939 100644 | |
--- a/fs/hfs/btree.h | |
+++ b/fs/hfs/btree.h | |
@@ -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 | |
diff --git a/fs/hfsplus/hfsplus_fs.h b/fs/hfsplus/hfsplus_fs.h | |
index 3b03fff68543..a92de5199ec3 100644 | |
--- a/fs/hfsplus/hfsplus_fs.h | |
+++ b/fs/hfsplus/hfsplus_fs.h | |
@@ -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 | |
diff --git a/fs/isofs/rock.h b/fs/isofs/rock.h | |
index 1558cf22ef8a..ee9660e9671c 100644 | |
--- a/fs/isofs/rock.h | |
+++ b/fs/isofs/rock.h | |
@@ -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 */ | |
diff --git a/fs/ocfs2/ocfs2_fs.h b/fs/ocfs2/ocfs2_fs.h | |
index 19137c6d087b..26949c776455 100644 | |
--- a/fs/ocfs2/ocfs2_fs.h | |
+++ b/fs/ocfs2/ocfs2_fs.h | |
@@ -529,7 +529,7 @@ struct ocfs2_extent_block | |
* value -1 (0xFFFF) is OCFS2_INVALID_SLOT. This marks a slot empty. | |
*/ | |
struct ocfs2_slot_map { | |
-/*00*/ __le16 sm_slots[0]; | |
+/*00*/ __le16 sm_slots[]; | |
/* | |
* Actual on-disk size is one block. OCFS2_MAX_SLOTS is 255, | |
* 255 * sizeof(__le16) == 512B, within the 512B block minimum blocksize. | |
@@ -550,7 +550,7 @@ struct ocfs2_extended_slot { | |
* i_size. | |
*/ | |
struct ocfs2_slot_map_extended { | |
-/*00*/ struct ocfs2_extended_slot se_slots[0]; | |
+/*00*/ struct ocfs2_extended_slot se_slots[]; | |
/* | |
* Actual size is i_size of the slot_map system file. It should | |
* match s_max_slots * sizeof(struct ocfs2_extended_slot) | |
diff --git a/fs/select.c b/fs/select.c | |
index 7aef49552d4c..ebfebdfe5c69 100644 | |
--- a/fs/select.c | |
+++ b/fs/select.c | |
@@ -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)) | |
diff --git a/fs/udf/ecma_167.h b/fs/udf/ecma_167.h | |
index 185c3e247648..addb051a152c 100644 | |
--- a/fs/udf/ecma_167.h | |
+++ b/fs/udf/ecma_167.h | |
@@ -307,14 +307,14 @@ struct logicalVolDesc { | |
struct regid impIdent; | |
uint8_t impUse[128]; | |
struct extent_ad integritySeqExt; | |
- uint8_t partitionMaps[0]; | |
+ uint8_t partitionMaps[]; | |
} __packed; | |
/* Generic Partition Map (ECMA 167r3 3/10.7.1) */ | |
struct genericPartitionMap { | |
uint8_t partitionMapType; | |
uint8_t partitionMapLength; | |
- uint8_t partitionMapping[0]; | |
+ uint8_t partitionMapping[]; | |
} __packed; | |
/* Partition Map Type (ECMA 167r3 3/10.7.1.1) */ | |
@@ -342,7 +342,7 @@ struct unallocSpaceDesc { | |
struct tag descTag; | |
__le32 volDescSeqNum; | |
__le32 numAllocDescs; | |
- struct extent_ad allocDescs[0]; | |
+ struct extent_ad allocDescs[]; | |
} __packed; | |
/* Terminating Descriptor (ECMA 167r3 3/10.9) */ | |
@@ -362,7 +362,7 @@ struct logicalVolIntegrityDesc { | |
__le32 lengthOfImpUse; | |
__le32 freeSpaceTable[0]; | |
__le32 sizeTable[0]; | |
- uint8_t impUse[0]; | |
+ uint8_t impUse[]; | |
} __packed; | |
/* Integrity Type (ECMA 167r3 3/10.10.3) */ | |
@@ -473,7 +473,7 @@ struct fileIdentDesc { | |
__le16 lengthOfImpUse; | |
uint8_t impUse[0]; | |
uint8_t fileIdent[0]; | |
- uint8_t padding[0]; | |
+ uint8_t padding[]; | |
} __packed; | |
/* File Characteristics (ECMA 167r3 4/14.4.3) */ | |
@@ -579,7 +579,7 @@ struct fileEntry { | |
__le32 lengthExtendedAttr; | |
__le32 lengthAllocDescs; | |
uint8_t extendedAttr[0]; | |
- uint8_t allocDescs[0]; | |
+ uint8_t allocDescs[]; | |
} __packed; | |
/* Permissions (ECMA 167r3 4/14.9.5) */ | |
@@ -632,7 +632,7 @@ struct genericFormat { | |
uint8_t attrSubtype; | |
uint8_t reserved[3]; | |
__le32 attrLength; | |
- uint8_t attrData[0]; | |
+ uint8_t attrData[]; | |
} __packed; | |
/* Character Set Information (ECMA 167r3 4/14.10.3) */ | |
@@ -643,7 +643,7 @@ struct charSetInfo { | |
__le32 attrLength; | |
__le32 escapeSeqLength; | |
uint8_t charSetType; | |
- uint8_t escapeSeq[0]; | |
+ uint8_t escapeSeq[]; | |
} __packed; | |
/* Alternate Permissions (ECMA 167r3 4/14.10.4) */ | |
@@ -682,7 +682,7 @@ struct infoTimesExtAttr { | |
__le32 attrLength; | |
__le32 dataLength; | |
__le32 infoTimeExistence; | |
- uint8_t infoTimes[0]; | |
+ uint8_t infoTimes[]; | |
} __packed; | |
/* Device Specification (ECMA 167r3 4/14.10.7) */ | |
@@ -694,7 +694,7 @@ struct deviceSpec { | |
__le32 impUseLength; | |
__le32 majorDeviceIdent; | |
__le32 minorDeviceIdent; | |
- uint8_t impUse[0]; | |
+ uint8_t impUse[]; | |
} __packed; | |
/* Implementation Use Extended Attr (ECMA 167r3 4/14.10.8) */ | |
@@ -705,7 +705,7 @@ struct impUseExtAttr { | |
__le32 attrLength; | |
__le32 impUseLength; | |
struct regid impIdent; | |
- uint8_t impUse[0]; | |
+ uint8_t impUse[]; | |
} __packed; | |
/* Application Use Extended Attribute (ECMA 167r3 4/14.10.9) */ | |
@@ -716,7 +716,7 @@ struct appUseExtAttr { | |
__le32 attrLength; | |
__le32 appUseLength; | |
struct regid appIdent; | |
- uint8_t appUse[0]; | |
+ uint8_t appUse[]; | |
} __packed; | |
#define EXTATTR_CHAR_SET 1 | |
@@ -733,7 +733,7 @@ struct unallocSpaceEntry { | |
struct tag descTag; | |
struct icbtag icbTag; | |
__le32 lengthAllocDescs; | |
- uint8_t allocDescs[0]; | |
+ uint8_t allocDescs[]; | |
} __packed; | |
/* Space Bitmap Descriptor (ECMA 167r3 4/14.12) */ | |
@@ -741,7 +741,7 @@ struct spaceBitmapDesc { | |
struct tag descTag; | |
__le32 numOfBits; | |
__le32 numOfBytes; | |
- uint8_t bitmap[0]; | |
+ uint8_t bitmap[]; | |
} __packed; | |
/* Partition Integrity Entry (ECMA 167r3 4/14.13) */ | |
@@ -780,7 +780,7 @@ struct pathComponent { | |
uint8_t componentType; | |
uint8_t lengthComponentIdent; | |
__le16 componentFileVersionNum; | |
- dchars componentIdent[0]; | |
+ dchars componentIdent[]; | |
} __packed; | |
/* File Entry (ECMA 167r3 4/14.17) */ | |
@@ -810,7 +810,7 @@ struct extendedFileEntry { | |
__le32 lengthExtendedAttr; | |
__le32 lengthAllocDescs; | |
uint8_t extendedAttr[0]; | |
- uint8_t allocDescs[0]; | |
+ uint8_t allocDescs[]; | |
} __packed; | |
#endif /* _ECMA_167_H */ | |
diff --git a/fs/udf/osta_udf.h b/fs/udf/osta_udf.h | |
index 22bc4fb2feb9..18a3dd27bfdf 100644 | |
--- a/fs/udf/osta_udf.h | |
+++ b/fs/udf/osta_udf.h | |
@@ -111,7 +111,7 @@ struct logicalVolIntegrityDescImpUse { | |
__le16 minUDFReadRev; | |
__le16 minUDFWriteRev; | |
__le16 maxUDFWriteRev; | |
- uint8_t impUse[0]; | |
+ uint8_t impUse[]; | |
} __packed; | |
/* Implementation Use Volume Descriptor (UDF 2.60 2.2.7) */ | |
@@ -200,7 +200,7 @@ struct virtualAllocationTable20 { | |
__le16 maxUDFWriteRev; | |
__le16 reserved; | |
uint8_t impUse[0]; | |
- __le32 vatEntry[0]; | |
+ __le32 vatEntry[]; | |
} __packed; | |
#define ICBTAG_FILE_TYPE_VAT20 0xF8U | |
@@ -218,7 +218,7 @@ struct sparingTable { | |
__le16 reserved; | |
__le32 sequenceNum; | |
struct sparingEntry | |
- mapEntry[0]; | |
+ mapEntry[]; | |
} __packed; | |
/* Metadata File (and Metadata Mirror File) (UDF 2.60 2.2.13.1) */ | |
@@ -241,7 +241,7 @@ struct allocDescImpUse { | |
/* FreeEASpace (UDF 2.60 3.3.4.5.1.1) */ | |
struct freeEaSpace { | |
__le16 headerChecksum; | |
- uint8_t freeEASpace[0]; | |
+ uint8_t freeEASpace[]; | |
} __packed; | |
/* DVD Copyright Management Information (UDF 2.60 3.3.4.5.1.2) */ | |
@@ -265,7 +265,7 @@ struct LVExtensionEA { | |
/* FreeAppEASpace (UDF 2.60 3.3.4.6.1) */ | |
struct freeAppEASpace { | |
__le16 headerChecksum; | |
- uint8_t freeEASpace[0]; | |
+ uint8_t freeEASpace[]; | |
} __packed; | |
/* UDF Defined System Stream (UDF 2.60 3.3.7) */ | |
diff --git a/fs/xfs/scrub/attr.h b/fs/xfs/scrub/attr.h | |
index 13a1d2e8424d..fdabe13df6ea 100644 | |
--- a/fs/xfs/scrub/attr.h | |
+++ b/fs/xfs/scrub/attr.h | |
@@ -24,7 +24,7 @@ struct xchk_xattr_buf { | |
* space bitmap follows immediately after; and we have a third buffer | |
* for storing intermediate bitmap results. | |
*/ | |
- uint8_t buf[0]; | |
+ uint8_t buf[]; | |
}; | |
/* A place to store attribute values. */ | |
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h | |
index 6661ee1cff47..17924b35eac2 100644 | |
--- a/include/asm-generic/tlb.h | |
+++ b/include/asm-generic/tlb.h | |
@@ -178,7 +178,7 @@ struct mmu_table_batch { | |
struct rcu_head rcu; | |
#endif | |
unsigned int nr; | |
- void *tables[0]; | |
+ void *tables[]; | |
}; | |
#define MAX_TABLE_BATCH \ | |
@@ -225,7 +225,7 @@ struct mmu_gather_batch { | |
struct mmu_gather_batch *next; | |
unsigned int nr; | |
unsigned int max; | |
- struct page *pages[0]; | |
+ struct page *pages[]; | |
}; | |
#define MAX_GATHER_BATCH \ | |
diff --git a/include/linux/dma/ti-cppi5.h b/include/linux/dma/ti-cppi5.h | |
index 579356ae447e..78c911269107 100644 | |
--- a/include/linux/dma/ti-cppi5.h | |
+++ b/include/linux/dma/ti-cppi5.h | |
@@ -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) | |
diff --git a/include/linux/firewire.h b/include/linux/firewire.h | |
index aec8f30ab200..023f07355b49 100644 | |
--- a/include/linux/firewire.h | |
+++ b/include/linux/firewire.h | |
@@ -398,7 +398,7 @@ struct fw_iso_packet { | |
u32 tag:2; /* tx: Tag in packet header */ | |
u32 sy:4; /* tx: Sy in packet header */ | |
u32 header_length:8; /* Length of immediate header */ | |
- u32 header[0]; /* tx: Top of 1394 isoch. data_block */ | |
+ u32 header[]; /* tx: Top of 1394 isoch. data_block */ | |
}; | |
#define FW_ISO_CONTEXT_TRANSMIT 0 | |
diff --git a/include/linux/fs.h b/include/linux/fs.h | |
index 407881ebeab1..a4e94a1cd21d 100644 | |
--- a/include/linux/fs.h | |
+++ b/include/linux/fs.h | |
@@ -3349,7 +3349,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)) | |
diff --git a/include/linux/greybus/greybus_manifest.h b/include/linux/greybus/greybus_manifest.h | |
index 6e62fe478712..bef9eb2093e9 100644 | |
--- a/include/linux/greybus/greybus_manifest.h | |
+++ b/include/linux/greybus/greybus_manifest.h | |
@@ -100,7 +100,7 @@ enum { | |
struct greybus_descriptor_string { | |
__u8 length; | |
__u8 id; | |
- __u8 string[0]; | |
+ __u8 string[]; | |
} __packed; | |
/* | |
@@ -175,7 +175,7 @@ struct greybus_manifest_header { | |
struct greybus_manifest { | |
struct greybus_manifest_header header; | |
- struct greybus_descriptor descriptors[0]; | |
+ struct greybus_descriptor descriptors[]; | |
} __packed; | |
#endif /* __GREYBUS_MANIFEST_H */ | |
diff --git a/include/linux/greybus/greybus_protocols.h b/include/linux/greybus/greybus_protocols.h | |
index aeb8f9243545..3af2ea8d701d 100644 | |
--- a/include/linux/greybus/greybus_protocols.h | |
+++ b/include/linux/greybus/greybus_protocols.h | |
@@ -112,7 +112,7 @@ struct gb_control_get_manifest_size_response { | |
/* Control protocol manifest get request has no payload */ | |
struct gb_control_get_manifest_response { | |
- __u8 data[0]; | |
+ __u8 data[]; | |
} __packed; | |
/* Control protocol [dis]connected request */ | |
@@ -233,7 +233,7 @@ struct gb_fw_download_fetch_firmware_request { | |
} __packed; | |
struct gb_fw_download_fetch_firmware_response { | |
- __u8 data[0]; | |
+ __u8 data[]; | |
} __packed; | |
/* firmware download release firmware request */ | |
@@ -415,7 +415,7 @@ struct gb_bootrom_get_firmware_request { | |
} __packed; | |
struct gb_bootrom_get_firmware_response { | |
- __u8 data[0]; | |
+ __u8 data[]; | |
} __packed; | |
/* Bootrom protocol Ready to boot request */ | |
@@ -647,7 +647,7 @@ struct gb_hid_set_report_request { | |
/* HID input report request, via interrupt pipe */ | |
struct gb_hid_input_report_request { | |
- __u8 report[0]; | |
+ __u8 report[]; | |
} __packed; | |
@@ -683,7 +683,7 @@ struct gb_i2c_transfer_request { | |
struct gb_i2c_transfer_op ops[]; /* op_count of these */ | |
} __packed; | |
struct gb_i2c_transfer_response { | |
- __u8 data[0]; /* inbound data */ | |
+ __u8 data[]; /* inbound data */ | |
} __packed; | |
@@ -912,7 +912,7 @@ struct gb_spi_transfer_request { | |
} __packed; | |
struct gb_spi_transfer_response { | |
- __u8 data[0]; /* inbound data */ | |
+ __u8 data[]; /* inbound data */ | |
} __packed; | |
/* Version of the Greybus SVC protocol we support */ | |
diff --git a/include/linux/greybus/hd.h b/include/linux/greybus/hd.h | |
index d3faf0c1a569..718e2857054e 100644 | |
--- a/include/linux/greybus/hd.h | |
+++ b/include/linux/greybus/hd.h | |
@@ -58,7 +58,7 @@ struct gb_host_device { | |
struct gb_svc *svc; | |
/* Private data for the host driver */ | |
- unsigned long hd_priv[0] __aligned(sizeof(s64)); | |
+ unsigned long hd_priv[] __aligned(sizeof(s64)); | |
}; | |
#define to_gb_host_device(d) container_of(d, struct gb_host_device, dev) | |
diff --git a/include/linux/greybus/module.h b/include/linux/greybus/module.h | |
index 47b839af145d..3efe2133acfd 100644 | |
--- a/include/linux/greybus/module.h | |
+++ b/include/linux/greybus/module.h | |
@@ -23,7 +23,7 @@ struct gb_module { | |
bool disconnected; | |
- struct gb_interface *interfaces[0]; | |
+ struct gb_interface *interfaces[]; | |
}; | |
#define to_gb_module(d) container_of(d, struct gb_module, dev) | |
diff --git a/include/linux/i3c/ccc.h b/include/linux/i3c/ccc.h | |
index 73b0982cc519..ad59a4ae60d1 100644 | |
--- a/include/linux/i3c/ccc.h | |
+++ b/include/linux/i3c/ccc.h | |
@@ -132,7 +132,7 @@ struct i3c_ccc_dev_desc { | |
struct i3c_ccc_defslvs { | |
u8 count; | |
struct i3c_ccc_dev_desc master; | |
- struct i3c_ccc_dev_desc slaves[0]; | |
+ struct i3c_ccc_dev_desc slaves[]; | |
} __packed; | |
/** | |
@@ -240,7 +240,7 @@ struct i3c_ccc_bridged_slave_desc { | |
*/ | |
struct i3c_ccc_setbrgtgt { | |
u8 count; | |
- struct i3c_ccc_bridged_slave_desc bslaves[0]; | |
+ struct i3c_ccc_bridged_slave_desc bslaves[]; | |
} __packed; | |
/** | |
@@ -318,7 +318,7 @@ enum i3c_ccc_setxtime_subcmd { | |
*/ | |
struct i3c_ccc_setxtime { | |
u8 subcmd; | |
- u8 data[0]; | |
+ u8 data[]; | |
} __packed; | |
#define I3C_CCC_GETXTIME_SYNC_MODE BIT(0) | |
diff --git a/include/linux/mailbox/zynqmp-ipi-message.h b/include/linux/mailbox/zynqmp-ipi-message.h | |
index 9542b41eacfd..35ce84c8ca02 100644 | |
--- a/include/linux/mailbox/zynqmp-ipi-message.h | |
+++ b/include/linux/mailbox/zynqmp-ipi-message.h | |
@@ -14,7 +14,7 @@ | |
*/ | |
struct zynqmp_ipi_message { | |
size_t len; | |
- u8 data[0]; | |
+ u8 data[]; | |
}; | |
#endif /* _LINUX_ZYNQMP_IPI_MESSAGE_H_ */ | |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h | |
index 1bb49b600310..4aadf53ca3d2 100644 | |
--- a/include/linux/memcontrol.h | |
+++ b/include/linux/memcontrol.h | |
@@ -161,7 +161,7 @@ enum memcg_kmem_state { | |
#if defined(CONFIG_SMP) | |
struct memcg_padding { | |
- char x[0]; | |
+ char x[]; | |
} ____cacheline_internodealigned_in_smp; | |
#define MEMCG_PADDING(name) struct memcg_padding name; | |
#else | |
@@ -327,7 +327,7 @@ struct mem_cgroup { | |
struct deferred_split deferred_split_queue; | |
#endif | |
- struct mem_cgroup_per_node *nodeinfo[0]; | |
+ struct mem_cgroup_per_node *nodeinfo[]; | |
/* WARNING: nodeinfo must be the last member here */ | |
}; | |
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h | |
index de1ffb4804d6..d2eb79418ecb 100644 | |
--- a/include/linux/mlx5/mlx5_ifc.h | |
+++ b/include/linux/mlx5/mlx5_ifc.h | |
@@ -5821,7 +5821,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 { | |
@@ -9759,7 +9759,7 @@ struct mlx5_ifc_mcda_reg_bits { | |
u8 reserved_at_60[0x20]; | |
- u8 data[0][0x20]; | |
+ u8 data[][0x20]; | |
}; | |
enum { | |
diff --git a/include/linux/mlx5/mlx5_ifc_fpga.h b/include/linux/mlx5/mlx5_ifc_fpga.h | |
index 07d77323f78a..cac4e94abd3a 100644 | |
--- a/include/linux/mlx5/mlx5_ifc_fpga.h | |
+++ b/include/linux/mlx5/mlx5_ifc_fpga.h | |
@@ -185,7 +185,7 @@ struct mlx5_ifc_fpga_access_reg_bits { | |
u8 address[0x40]; | |
- u8 data[0][0x8]; | |
+ u8 data[][0x8]; | |
}; | |
enum mlx5_ifc_fpga_qp_state { | |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h | |
index 635a96cd9b1f..f89114826b4b 100644 | |
--- a/include/linux/mmzone.h | |
+++ b/include/linux/mmzone.h | |
@@ -120,7 +120,7 @@ struct pglist_data; | |
*/ | |
#if defined(CONFIG_SMP) | |
struct zone_padding { | |
- char x[0]; | |
+ char x[]; | |
} ____cacheline_internodealigned_in_smp; | |
#define ZONE_PADDING(name) struct zone_padding name; | |
#else | |
@@ -1152,7 +1152,7 @@ struct mem_section_usage { | |
DECLARE_BITMAP(subsection_map, SUBSECTIONS_PER_SECTION); | |
#endif | |
/* See declaration of similar field in struct zone */ | |
- unsigned long pageblock_flags[0]; | |
+ unsigned long pageblock_flags[]; | |
}; | |
void subsection_map_init(unsigned long pfn, unsigned long nr_pages); | |
diff --git a/include/linux/platform_data/brcmfmac.h b/include/linux/platform_data/brcmfmac.h | |
index 1d30bf278231..f922a192fe58 100644 | |
--- a/include/linux/platform_data/brcmfmac.h | |
+++ b/include/linux/platform_data/brcmfmac.h | |
@@ -125,7 +125,7 @@ struct brcmfmac_pd_cc_entry { | |
*/ | |
struct brcmfmac_pd_cc { | |
int table_size; | |
- struct brcmfmac_pd_cc_entry table[0]; | |
+ struct brcmfmac_pd_cc_entry table[]; | |
}; | |
/** | |
@@ -178,7 +178,7 @@ struct brcmfmac_platform_data { | |
void (*power_off)(void); | |
char *fw_alternative_path; | |
int device_count; | |
- struct brcmfmac_pd_device devices[0]; | |
+ struct brcmfmac_pd_device devices[]; | |
}; | |
diff --git a/include/linux/platform_data/cros_ec_commands.h b/include/linux/platform_data/cros_ec_commands.h | |
index 91e77f53414d..771585fa2c89 100644 | |
--- a/include/linux/platform_data/cros_ec_commands.h | |
+++ b/include/linux/platform_data/cros_ec_commands.h | |
@@ -5065,7 +5065,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. */ | |
@@ -5774,7 +5774,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 */ | |
diff --git a/include/linux/platform_data/cros_ec_proto.h b/include/linux/platform_data/cros_ec_proto.h | |
index 383243326676..7f03e02c48cd 100644 | |
--- a/include/linux/platform_data/cros_ec_proto.h | |
+++ b/include/linux/platform_data/cros_ec_proto.h | |
@@ -69,7 +69,7 @@ struct cros_ec_command { | |
uint32_t outsize; | |
uint32_t insize; | |
uint32_t result; | |
- uint8_t data[0]; | |
+ uint8_t data[]; | |
}; | |
/** | |
diff --git a/include/linux/sctp.h b/include/linux/sctp.h | |
index 76731230bbc5..7c06b2d6e7d1 100644 | |
--- a/include/linux/sctp.h | |
+++ b/include/linux/sctp.h | |
@@ -238,7 +238,7 @@ struct sctp_idatahdr { | |
__u32 ppid; | |
__be32 fsn; | |
}; | |
- __u8 payload[0]; | |
+ __u8 payload[]; | |
}; | |
struct sctp_idata_chunk { | |
diff --git a/include/linux/ti_wilink_st.h b/include/linux/ti_wilink_st.h | |
index 44a7f9169ac6..63a950bd8b0f 100644 | |
--- a/include/linux/ti_wilink_st.h | |
+++ b/include/linux/ti_wilink_st.h | |
@@ -309,7 +309,7 @@ struct bts_action { | |
} __attribute__ ((packed)); | |
struct bts_action_send { | |
- u8 data[0]; | |
+ u8 data[]; | |
} __attribute__ ((packed)); | |
struct bts_action_wait { | |
diff --git a/include/net/devlink.h b/include/net/devlink.h | |
index 8f3c8a443238..0c7bd355cd14 100644 | |
--- a/include/net/devlink.h | |
+++ b/include/net/devlink.h | |
@@ -46,7 +46,7 @@ struct devlink { | |
u8 reload_failed:1, | |
reload_enabled:1, | |
registered:1; | |
- char priv[0] __aligned(NETDEV_ALIGN); | |
+ char priv[] __aligned(NETDEV_ALIGN); | |
}; | |
struct devlink_port_phys_attrs { | |
diff --git a/include/scsi/scsi_bsg_iscsi.h b/include/scsi/scsi_bsg_iscsi.h | |
index 6b8128005af8..6f04ca7d30d9 100644 | |
--- a/include/scsi/scsi_bsg_iscsi.h | |
+++ b/include/scsi/scsi_bsg_iscsi.h | |
@@ -59,7 +59,7 @@ struct iscsi_bsg_host_vendor { | |
*/ | |
struct iscsi_bsg_host_vendor_reply { | |
/* start of vendor response area */ | |
- uint32_t vendor_rsp[0]; | |
+ uint32_t vendor_rsp[]; | |
}; | |
diff --git a/include/sound/sof/channel_map.h b/include/sound/sof/channel_map.h | |
index fd3a30fcf756..d363f0ca6979 100644 | |
--- a/include/sound/sof/channel_map.h | |
+++ b/include/sound/sof/channel_map.h | |
@@ -39,7 +39,7 @@ struct sof_ipc_channel_map { | |
uint32_t ext_id; | |
uint32_t ch_mask; | |
uint32_t reserved; | |
- int32_t ch_coeffs[0]; | |
+ int32_t ch_coeffs[]; | |
} __packed; | |
/** | |
@@ -55,7 +55,7 @@ struct sof_ipc_stream_map { | |
struct sof_ipc_cmd_hdr hdr; | |
uint32_t num_ch_map; | |
uint32_t reserved[3]; | |
- struct sof_ipc_channel_map ch_map[0]; | |
+ struct sof_ipc_channel_map ch_map[]; | |
} __packed; | |
#endif /* __IPC_CHANNEL_MAP_H__ */ | |
diff --git a/include/sound/sof/topology.h b/include/sound/sof/topology.h | |
index f56e80d09b32..3afa781ae943 100644 | |
--- a/include/sound/sof/topology.h | |
+++ b/include/sound/sof/topology.h | |
@@ -234,7 +234,7 @@ struct sof_ipc_comp_process { | |
/* reserved for future use */ | |
uint32_t reserved[7]; | |
- uint8_t data[0]; | |
+ uint8_t data[]; | |
} __packed; | |
/* frees components, buffers and pipelines | |
diff --git a/kernel/params.c b/kernel/params.c | |
index 8e56f8b12d8f..55c07e3b9903 100644 | |
--- a/kernel/params.c | |
+++ b/kernel/params.c | |
@@ -529,7 +529,7 @@ struct module_param_attrs | |
{ | |
unsigned int num; | |
struct attribute_group grp; | |
- struct param_attribute attrs[0]; | |
+ struct param_attribute attrs[]; | |
}; | |
#ifdef CONFIG_SYSFS | |
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h | |
index 3fd283892761..54455f4a579f 100644 | |
--- a/kernel/sched/sched.h | |
+++ b/kernel/sched/sched.h | |
@@ -1471,7 +1471,7 @@ struct sched_group_capacity { | |
int id; | |
#endif | |
- unsigned long cpumask[0]; /* Balance mask */ | |
+ unsigned long cpumask[]; /* Balance mask */ | |
}; | |
struct sched_group { | |
diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c | |
index 73956eaff8a9..3ee46cda2692 100644 | |
--- a/kernel/tracepoint.c | |
+++ b/kernel/tracepoint.c | |
@@ -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) | |
diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c | |
index 8579bfeb2836..87682851da70 100644 | |
--- a/net/bluetooth/msft.c | |
+++ b/net/bluetooth/msft.c | |
@@ -17,7 +17,7 @@ struct msft_rp_read_supported_features { | |
__u8 sub_opcode; | |
__le64 features; | |
__u8 evt_prefix_len; | |
- __u8 evt_prefix[0]; | |
+ __u8 evt_prefix[]; | |
} __packed; | |
struct msft_data { | |
diff --git a/net/ceph/auth_none.h b/net/ceph/auth_none.h | |
index 4158f064302e..3c68c0ee3dab 100644 | |
--- a/net/ceph/auth_none.h | |
+++ b/net/ceph/auth_none.h | |
@@ -16,7 +16,7 @@ struct ceph_none_authorizer { | |
struct ceph_authorizer base; | |
char buf[128]; | |
int buf_len; | |
- char reply_buf[0]; | |
+ char reply_buf[]; | |
}; | |
struct ceph_auth_none_info { | |
diff --git a/net/ipv6/rpl_iptunnel.c b/net/ipv6/rpl_iptunnel.c | |
index 5fdf3ebb953f..71fb0121a7de 100644 | |
--- a/net/ipv6/rpl_iptunnel.c | |
+++ b/net/ipv6/rpl_iptunnel.c | |
@@ -13,7 +13,7 @@ | |
#include <net/rpl.h> | |
struct rpl_iptunnel_encap { | |
- struct ipv6_rpl_sr_hdr srh[0]; | |
+ struct ipv6_rpl_sr_hdr srh[]; | |
}; | |
struct rpl_lwt { | |
diff --git a/scripts/dtc/libfdt/fdt.h b/scripts/dtc/libfdt/fdt.h | |
index f2e68807f277..0c91aa7f67b5 100644 | |
--- a/scripts/dtc/libfdt/fdt.h | |
+++ b/scripts/dtc/libfdt/fdt.h | |
@@ -35,14 +35,14 @@ struct fdt_reserve_entry { | |
struct fdt_node_header { | |
fdt32_t tag; | |
- char name[0]; | |
+ char name[]; | |
}; | |
struct fdt_property { | |
fdt32_t tag; | |
fdt32_t len; | |
fdt32_t nameoff; | |
- char data[0]; | |
+ char data[]; | |
}; | |
#endif /* !__ASSEMBLY */ | |
diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h | |
index 38043074ce5e..6ebefec616e4 100644 | |
--- a/security/integrity/ima/ima.h | |
+++ b/security/integrity/ima/ima.h | |
@@ -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 { | |
diff --git a/sound/soc/intel/atom/sst-mfld-dsp.h b/sound/soc/intel/atom/sst-mfld-dsp.h | |
index 5795f98e04d4..9dd9abbfca7d 100644 | |
--- a/sound/soc/intel/atom/sst-mfld-dsp.h | |
+++ b/sound/soc/intel/atom/sst-mfld-dsp.h | |
@@ -427,7 +427,7 @@ struct snd_sst_drop_response { | |
struct snd_sst_async_msg { | |
u32 msg_id; /* Async msg id */ | |
- u32 payload[0]; | |
+ u32 payload[]; | |
}; | |
struct snd_sst_async_err_msg { | |
@@ -514,7 +514,7 @@ struct snd_sst_bytes_v2 { | |
u8 pipe_id; | |
u8 rsvd; | |
u16 len; | |
- char bytes[0]; | |
+ char bytes[]; | |
}; | |
#define MAX_VTSV_FILES 2 | |
diff --git a/tools/lib/perf/include/perf/event.h b/tools/lib/perf/include/perf/event.h | |
index 69b44d2cc0f5..7d642f475882 100644 | |
--- a/tools/lib/perf/include/perf/event.h | |
+++ b/tools/lib/perf/include/perf/event.h | |
@@ -210,7 +210,7 @@ struct id_index_entry { | |
struct perf_record_id_index { | |
struct perf_event_header header; | |
__u64 nr; | |
- struct id_index_entry entries[0]; | |
+ struct id_index_entry entries[]; | |
}; | |
struct perf_record_auxtrace_info { | |
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h | |
index 66d39c4cfe2b..e53c2842cf5d 100644 | |
--- a/tools/perf/util/sort.h | |
+++ b/tools/perf/util/sort.h | |
@@ -157,7 +157,7 @@ struct hist_entry { | |
}; /* non-leaf entries */ | |
struct rb_root sorted_chain; /* leaf entry has callchains */ | |
}; | |
- struct callchain_root callchain[0]; /* must be last member */ | |
+ struct callchain_root callchain[]; /* must be last member */ | |
}; | |
static __pure inline bool hist_entry__has_callchains(struct hist_entry *he) | |
diff --git a/tools/testing/selftests/bpf/progs/btf_dump_test_case_padding.c b/tools/testing/selftests/bpf/progs/btf_dump_test_case_padding.c | |
index 35c512818a56..c14b75ced765 100644 | |
--- a/tools/testing/selftests/bpf/progs/btf_dump_test_case_padding.c | |
+++ b/tools/testing/selftests/bpf/progs/btf_dump_test_case_padding.c | |
@@ -93,7 +93,7 @@ struct padded_cache_line { | |
/* ------ END-EXPECTED-OUTPUT ------ */ | |
struct zone_padding { | |
- char x[0]; | |
+ char x[]; | |
} __attribute__((__aligned__(8))); | |
struct zone { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment