Skip to content

Commit 0b56a29

Browse files
committed
Merge branch 'net-zl-array'
More zero-length array transformations from Gustavo A. R. Silva. Signed-off-by: David S. Miller <[email protected]>
2 parents 6f2f92a + 23640d6 commit 0b56a29

File tree

10 files changed

+18
-18
lines changed

10 files changed

+18
-18
lines changed

drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ struct __packed offload_info {
225225
struct offload_port_info ports;
226226
struct offload_ka_info kas;
227227
struct offload_rr_info rrs;
228-
u8 buf[0];
228+
u8 buf[];
229229
};
230230

231231
struct __packed hw_atl_utils_fw_rpc {

drivers/net/ethernet/brocade/bna/bnad.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ struct bnad_rx_unmap_q {
253253
int alloc_order;
254254
u32 map_size;
255255
enum bnad_rxbuf_type type;
256-
struct bnad_rx_unmap unmap[0] ____cacheline_aligned;
256+
struct bnad_rx_unmap unmap[] ____cacheline_aligned;
257257
};
258258

259259
#define BNAD_PCI_DEV_IS_CAT2(_bnad) \

drivers/net/ethernet/tehuti/tehuti.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ struct txd_desc {
330330
u16 length;
331331
u32 va_lo;
332332
u32 va_hi;
333-
struct pbl pbl[0]; /* Fragments */
333+
struct pbl pbl[]; /* Fragments */
334334
} __packed;
335335

336336
/* Register region size */

drivers/net/usb/r8152.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ struct fw_block {
891891
struct fw_header {
892892
u8 checksum[32];
893893
char version[RTL_VER_SIZE];
894-
struct fw_block blocks[0];
894+
struct fw_block blocks[];
895895
} __packed;
896896

897897
/**
@@ -930,7 +930,7 @@ struct fw_mac {
930930
__le32 reserved;
931931
__le16 fw_ver_reg;
932932
u8 fw_ver_data;
933-
char info[0];
933+
char info[];
934934
} __packed;
935935

936936
/**
@@ -982,7 +982,7 @@ struct fw_phy_nc {
982982
__le16 bp_start;
983983
__le16 bp_num;
984984
__le16 bp[4];
985-
char info[0];
985+
char info[];
986986
} __packed;
987987

988988
enum rtl_fw_type {

include/linux/netdevice.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ static inline void netdev_queue_numa_node_write(struct netdev_queue *q, int node
664664
struct rps_map {
665665
unsigned int len;
666666
struct rcu_head rcu;
667-
u16 cpus[0];
667+
u16 cpus[];
668668
};
669669
#define RPS_MAP_SIZE(_num) (sizeof(struct rps_map) + ((_num) * sizeof(u16)))
670670

@@ -686,7 +686,7 @@ struct rps_dev_flow {
686686
struct rps_dev_flow_table {
687687
unsigned int mask;
688688
struct rcu_head rcu;
689-
struct rps_dev_flow flows[0];
689+
struct rps_dev_flow flows[];
690690
};
691691
#define RPS_DEV_FLOW_TABLE_SIZE(_num) (sizeof(struct rps_dev_flow_table) + \
692692
((_num) * sizeof(struct rps_dev_flow)))
@@ -704,7 +704,7 @@ struct rps_dev_flow_table {
704704
struct rps_sock_flow_table {
705705
u32 mask;
706706

707-
u32 ents[0] ____cacheline_aligned_in_smp;
707+
u32 ents[] ____cacheline_aligned_in_smp;
708708
};
709709
#define RPS_SOCK_FLOW_TABLE_SIZE(_num) (offsetof(struct rps_sock_flow_table, ents[_num]))
710710

@@ -767,7 +767,7 @@ struct xps_map {
767767
unsigned int len;
768768
unsigned int alloc_len;
769769
struct rcu_head rcu;
770-
u16 queues[0];
770+
u16 queues[];
771771
};
772772
#define XPS_MAP_SIZE(_num) (sizeof(struct xps_map) + ((_num) * sizeof(u16)))
773773
#define XPS_MIN_MAP_ALLOC ((L1_CACHE_ALIGN(offsetof(struct xps_map, queues[1])) \
@@ -778,7 +778,7 @@ struct xps_map {
778778
*/
779779
struct xps_dev_maps {
780780
struct rcu_head rcu;
781-
struct xps_map __rcu *attr_map[0]; /* Either CPUs map or RXQs map */
781+
struct xps_map __rcu *attr_map[]; /* Either CPUs map or RXQs map */
782782
};
783783

784784
#define XPS_CPU_DEV_MAPS_SIZE(_tcs) (sizeof(struct xps_dev_maps) + \

include/net/inet_sock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ struct ip_options {
5252
unsigned char router_alert;
5353
unsigned char cipso;
5454
unsigned char __pad2;
55-
unsigned char __data[0];
55+
unsigned char __data[];
5656
};
5757

5858
struct ip_options_rcu {

include/net/ip6_fib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ struct fib6_info {
198198

199199
struct rcu_head rcu;
200200
struct nexthop *nh;
201-
struct fib6_nh fib6_nh[0];
201+
struct fib6_nh fib6_nh[];
202202
};
203203

204204
struct rt6_info {

include/net/ip_fib.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ struct fib_info {
153153
bool nh_updated;
154154
struct nexthop *nh;
155155
struct rcu_head rcu;
156-
struct fib_nh fib_nh[0];
156+
struct fib_nh fib_nh[];
157157
};
158158

159159

@@ -250,7 +250,7 @@ struct fib_table {
250250
int tb_num_default;
251251
struct rcu_head rcu;
252252
unsigned long *tb_data;
253-
unsigned long __data[0];
253+
unsigned long __data[];
254254
};
255255

256256
struct fib_dump_filter {

include/net/mip6.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ struct ip6_mh {
2525
__u8 ip6mh_reserved;
2626
__u16 ip6mh_cksum;
2727
/* Followed by type specific messages */
28-
__u8 data[0];
28+
__u8 data[];
2929
} __packed;
3030

3131
#define IP6_MH_TYPE_BRR 0 /* Binding Refresh Request */

include/uapi/linux/net_dropmon.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ struct net_dm_config_entry {
2929

3030
struct net_dm_config_msg {
3131
__u32 entries;
32-
struct net_dm_config_entry options[0];
32+
struct net_dm_config_entry options[];
3333
};
3434

3535
struct net_dm_alert_msg {
3636
__u32 entries;
37-
struct net_dm_drop_point points[0];
37+
struct net_dm_drop_point points[];
3838
};
3939

4040
struct net_dm_user_msg {

0 commit comments

Comments
 (0)