net/dpaa: fix uninitialized and unused variables
authorHemant Agrawal <hemant.agrawal@nxp.com>
Wed, 10 Jan 2018 10:46:23 +0000 (16:16 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 16 Jan 2018 17:47:49 +0000 (18:47 +0100)
This patch fixes the issues reported by NXP's internal
coverity build.

Fixes: 05ba55bc2b1a ("net/dpaa: add packet dump for debugging")
Fixes: 37f9b54bd3cf ("net/dpaa: support Tx and Rx queue setup")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
drivers/net/dpaa/dpaa_ethdev.c
drivers/net/dpaa/dpaa_rxtx.c

index 2eb00b5..7b4a6f1 100644 (file)
@@ -697,7 +697,7 @@ static int dpaa_fc_set_default(struct dpaa_if *dpaa_intf)
 static int dpaa_rx_queue_init(struct qman_fq *fq,
                              uint32_t fqid)
 {
-       struct qm_mcc_initfq opts;
+       struct qm_mcc_initfq opts = {0};
        int ret;
 
        PMD_INIT_FUNC_TRACE();
@@ -743,7 +743,7 @@ static int dpaa_rx_queue_init(struct qman_fq *fq,
 static int dpaa_tx_queue_init(struct qman_fq *fq,
                              struct fman_if *fman_intf)
 {
-       struct qm_mcc_initfq opts;
+       struct qm_mcc_initfq opts = {0};
        int ret;
 
        PMD_INIT_FUNC_TRACE();
@@ -774,7 +774,7 @@ static int dpaa_tx_queue_init(struct qman_fq *fq,
 /* Initialise a DEBUG FQ ([rt]x_error, rx_default). */
 static int dpaa_debug_queue_init(struct qman_fq *fq, uint32_t fqid)
 {
-       struct qm_mcc_initfq opts;
+       struct qm_mcc_initfq opts = {0};
        int ret;
 
        PMD_INIT_FUNC_TRACE();
index 905ecc0..c3a0920 100644 (file)
@@ -639,7 +639,7 @@ tx_on_external_pool(struct qman_fq *txq, struct rte_mbuf *mbuf,
                return 1;
        }
 
-       DPAA_MBUF_TO_CONTIG_FD(mbuf, fd_arr, dpaa_intf->bp_info->bpid);
+       DPAA_MBUF_TO_CONTIG_FD(dmable_mbuf, fd_arr, dpaa_intf->bp_info->bpid);
 
        return 0;
 }