From: Hemant Agrawal Date: Wed, 10 Jan 2018 10:46:23 +0000 (+0530) Subject: net/dpaa: fix uninitialized and unused variables X-Git-Tag: spdx-start~397 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8d804cf1a2f75b935a70de40cc1d0b286d50bf60;p=dpdk.git net/dpaa: fix uninitialized and unused variables 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 --- diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 2eb00b5f18..7b4a6f11df 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -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(); diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c index 905ecc09f6..c3a0920c49 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -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; }