From: Tomasz Duszynski Date: Fri, 24 Aug 2018 18:30:00 +0000 (+0200) Subject: net/mvpp2: fix array initialization X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=fe37bf0f7d43ceab88a3b71ef1b13d509c1b7bb9;p=dpdk.git net/mvpp2: fix array initialization Fix used_bpools array initialization by using range initializer. This way all necessary variables are properly initialized regardless of PP2_NUM_PKT_PROC value. Fixes: 0ddc9b815b11 ("net/mrvl: add net PMD skeleton") Cc: stable@dpdk.org Signed-off-by: Tomasz Duszynski --- diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c index 8e1a32f41d..fdf416b044 100644 --- a/drivers/net/mvpp2/mrvl_ethdev.c +++ b/drivers/net/mvpp2/mrvl_ethdev.c @@ -84,8 +84,7 @@ static const char * const valid_args[] = { static int used_hifs = MRVL_MUSDK_HIFS_RESERVED; static struct pp2_hif *hifs[RTE_MAX_LCORE]; static int used_bpools[PP2_NUM_PKT_PROC] = { - MRVL_MUSDK_BPOOLS_RESERVED, - MRVL_MUSDK_BPOOLS_RESERVED + [0 ... PP2_NUM_PKT_PROC - 1] = MRVL_MUSDK_BPOOLS_RESERVED }; struct pp2_bpool *mrvl_port_to_bpool_lookup[RTE_MAX_ETHPORTS];