patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Tomasz Duszynski <tdu@semihalf.com>
To: dev@dpdk.org
Cc: nsamsono@marvell.com, mw@semihalf.com,
	Tomasz Duszynski <tdu@semihalf.com>,
	stable@dpdk.org
Subject: [dpdk-stable] [PATCH 3/6] net/mvpp2: fix array initialization
Date: Fri, 24 Aug 2018 14:16:43 +0200	[thread overview]
Message-ID: <1535113006-9393-4-git-send-email-tdu@semihalf.com> (raw)
In-Reply-To: <1535113006-9393-1-git-send-email-tdu@semihalf.com>

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 <tdu@semihalf.com>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 7ea8946..60ca6e0 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];
-- 
2.7.4

       reply	other threads:[~2018-08-24 12:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1535113006-9393-1-git-send-email-tdu@semihalf.com>
2018-08-24 12:16 ` Tomasz Duszynski [this message]
     [not found] ` <1535122494-30249-1-git-send-email-tdu@semihalf.com>
2018-08-24 14:54   ` [dpdk-stable] [PATCH v2 " Tomasz Duszynski
2018-08-24 16:46     ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit
2018-08-24 17:53       ` Tomasz Duszynski
     [not found]   ` <1535135403-16115-1-git-send-email-tdu@semihalf.com>
2018-08-24 18:30     ` [dpdk-stable] [PATCH v3 " Tomasz Duszynski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1535113006-9393-4-git-send-email-tdu@semihalf.com \
    --to=tdu@semihalf.com \
    --cc=dev@dpdk.org \
    --cc=mw@semihalf.com \
    --cc=nsamsono@marvell.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).