From: Sangtani Parag Satishbhai <[email protected]>

This patch removes redundant code from two files which is used
during mpc init. The NULL condition check for mpc member in
bnxt_mpc.c file is not required as mpc will always be initialized
for P7 platform. The extra condition added in bnxt_ethdev.c to
enable mpc for tf apps is not required as it will be always be
enabled for P7 platform.

Signed-off-by: Sangtani Parag Satishbhai 
<[email protected]>
Reviewed-by: Ajit Khaparde <[email protected]>
---
 drivers/net/bnxt/bnxt_mpc.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_mpc.c b/drivers/net/bnxt/bnxt_mpc.c
index ff2f0d7043..2582b50782 100644
--- a/drivers/net/bnxt/bnxt_mpc.c
+++ b/drivers/net/bnxt/bnxt_mpc.c
@@ -719,20 +719,10 @@ int bnxt_mpc_send(struct bnxt *bp,
                  bool batch)
 {
        int rc;
-       struct bnxt_mpc_txq *mpc_queue;
+       struct bnxt_mpc_txq *mpc_queue = bp->mpc->mpc_txq[in_msg->chnl_id];
        int retry = BNXT_MPC_RX_RETRY;
        uint32_t pi = 0;
 
-       /*
-        * TODO: This condition check is added to avoid
-        * segmentation fault in case mpc argument is
-        * missing in dev-args. Fix this by removing
-        * mpc argument from dev args.
-        */
-       if (!bp->mpc)
-               return -1;
-       mpc_queue = bp->mpc->mpc_txq[in_msg->chnl_id];
-
        if (out_msg->cmp_type != CMPL_BASE_TYPE_MID_PATH_SHORT &&
            out_msg->cmp_type != CMPL_BASE_TYPE_MID_PATH_LONG)
                return -1;
-- 
2.39.5 (Apple Git-154)

Reply via email to