patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: dev@dpdk.org, bruce.richardson@intel.com
Cc: thomas@monjalon.net, stable@dpdk.org
Subject: [dpdk-stable] [PATCH v2 02/10] bus/dpaa: fix the BE compilation issue
Date: Thu,  1 Mar 2018 13:03:09 +0530	[thread overview]
Message-ID: <1519889597-5805-3-git-send-email-hemant.agrawal@nxp.com> (raw)
In-Reply-To: <1519889597-5805-1-git-send-email-hemant.agrawal@nxp.com>

The array pointers were used without index.

Fixes: b9083ea5e084 ("net/dpaa: further push mode optimizations")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/dpaa/base/qbman/qman.c        | 5 +++--
 drivers/bus/dpaa/base/qbman/qman_driver.c | 5 +----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c
index 2b97671..2810fdd 100644
--- a/drivers/bus/dpaa/base/qbman/qman.c
+++ b/drivers/bus/dpaa/base/qbman/qman.c
@@ -1087,7 +1087,7 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit,
 		shadow[rx_number]->fd.opaque =
 			be32_to_cpu(dq[rx_number]->fd.opaque);
 #else
-		shadow = dq;
+		shadow[rx_number] = dq[rx_number];
 #endif
 
 		/* SDQCR: context_b points to the FQ */
@@ -1095,7 +1095,8 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit,
 		fq[rx_number] = qman_fq_lookup_table[be32_to_cpu(
 						dq[rx_number]->contextB)];
 #else
-		fq[rx_number] = (void *)(uintptr_t)be32_to_cpu(dq->contextB);
+		fq[rx_number] = (void *)be32_to_cpu(
+						dq[rx_number]->contextB);
 #endif
 		fq[rx_number]->cb.dqrr_prepare(shadow[rx_number],
 						 &bufs[rx_number]);
diff --git a/drivers/bus/dpaa/base/qbman/qman_driver.c b/drivers/bus/dpaa/base/qbman/qman_driver.c
index 7cfa8ee..66838d2 100644
--- a/drivers/bus/dpaa/base/qbman/qman_driver.c
+++ b/drivers/bus/dpaa/base/qbman/qman_driver.c
@@ -246,7 +246,6 @@ int fsl_qman_portal_destroy(struct qman_portal *qp)
 int qman_global_init(void)
 {
 	const struct device_node *dt_node;
-	int ret = 0;
 	size_t lenp;
 	const u32 *chanid;
 	static int ccsr_map_fd;
@@ -352,9 +351,7 @@ int qman_global_init(void)
 		qman_clk = be32_to_cpu(*clk);
 
 #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP
-	ret = qman_setup_fq_lookup_table(CONFIG_FSL_QMAN_FQ_LOOKUP_MAX);
-	if (ret)
-		return ret;
+	return qman_setup_fq_lookup_table(CONFIG_FSL_QMAN_FQ_LOOKUP_MAX);
 #endif
 	return 0;
 }
-- 
2.7.4

  parent reply	other threads:[~2018-03-01  7:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1519752352-15442-1-git-send-email-hemant.agrawal@nxp.com>
2018-02-27 17:25 ` [dpdk-stable] [PATCH 1/7] event/dpaa: fix include header Hemant Agrawal
     [not found] ` <1519889597-5805-1-git-send-email-hemant.agrawal@nxp.com>
2018-03-01  7:33   ` [dpdk-stable] [PATCH v2 01/10] " Hemant Agrawal
2018-03-01  7:33   ` Hemant Agrawal [this message]
2018-03-01 12:22     ` [dpdk-stable] [dpdk-dev] [PATCH v2 02/10] bus/dpaa: fix the BE compilation issue Shreyansh Jain
     [not found]   ` <1521014166-3201-1-git-send-email-hemant.agrawal@nxp.com>
2018-03-14  7:55     ` [dpdk-stable] [PATCH v3 01/10] event/dpaa: fix include header Hemant Agrawal
2018-03-14  7:55     ` [dpdk-stable] [PATCH v3 02/10] bus/dpaa: fix the BE compilation issue Hemant Agrawal

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=1519889597-5805-3-git-send-email-hemant.agrawal@nxp.com \
    --to=hemant.agrawal@nxp.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /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).