From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 62344A0C47; Sat, 25 Sep 2021 16:24:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E38B74003D; Sat, 25 Sep 2021 16:24:14 +0200 (CEST) Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by mails.dpdk.org (Postfix) with ESMTP id 26A5D4003C for ; Sat, 25 Sep 2021 16:24:13 +0200 (CEST) Received: by mail-pg1-f174.google.com with SMTP id w8so12870303pgf.5 for ; Sat, 25 Sep 2021 07:24:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version; bh=B47MMljtTTpIhJJRcu90qZ7To1jeb2QmF3yn0C0pCCQ=; b=bdueYVERPCBIhi0R8Wz+0Gimm0hPktwfaoTj1iuvEn4/gFdY5Ot13tXKdu5W7HCaJJ bo6NMRwoS0rUU7z99eGI3tYnjWB2f5Vpriz0ZHdVsWHJGo7TuXWlB0lXI9ligGDRyStD ncn47/5ODMsllkp/UA1hRm0Ziq40T1niq0lMI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version; bh=B47MMljtTTpIhJJRcu90qZ7To1jeb2QmF3yn0C0pCCQ=; b=IhzgNOVpvAEXuJxHMKczdsDOzAxdBKk/iicxsyecdIUR0+6bnK0KvKhc45eidsKqAB ax87+cFw2tv6rOckeskVRb3HuTE7phCYuauokPH/FgQEWvYOY7HWyRTio2U7YZy/AVrr l1VClUln5lrggNmL5d2l30qcxJXUTD1eucpUWD+bZSUZLUk8r3puAiJtEtrFZUmLaKlD 0iHlOwJxSb9Nwrzu+StcrwziSMBba+g+lZl02R5sR87q18YZXm1iaP9YEN3ACxcrdbfH uTlylQw7IhSxWdeekou5ocYaMHhUTmqsaluPjhib0grgAlu/aqKiQ2hD6svDfWYIKzCW 7e8A== X-Gm-Message-State: AOAM530LlbogCvh1TjUxYqfqaA4IZH2p7u0vt6S7pjF//uDUu7X18iri rCiyC9gvDUWVFBUhiXASSaW7ers/DzHNrCjTnAJzL26ozLxd3mODefzn+z0CS1iEXAyEWHb5noS GIW4vOowNwQowzhwUiFf5AbN/a69rRpFbEI8VZz9DGPSumD61rxS/nUs2el3IpeA= X-Google-Smtp-Source: ABdhPJwah05cS3T1SSnULw23Y5yuQESoZeGp+pbnhdxb0mUg8S9DWeKQsrx9WzfdPSOq/b9120/zYg== X-Received: by 2002:a65:4007:: with SMTP id f7mr8276313pgp.251.1632579851632; Sat, 25 Sep 2021 07:24:11 -0700 (PDT) Received: from localhost.localdomain ([192.19.161.250]) by smtp.gmail.com with ESMTPSA id q20sm12592261pfc.57.2021.09.25.07.24.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 25 Sep 2021 07:24:10 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, venkatkumar.duvvuru@broadcom.com, Kishore Padmanabha , Farah Smith Date: Sat, 25 Sep 2021 07:24:01 -0700 Message-Id: <20210925142401.53868-1-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.30.1 (Apple Git-130) In-Reply-To: <29ca852a-c6cf-5aa2-6397-da61a2bbddd5@intel.com> References: <29ca852a-c6cf-5aa2-6397-da61a2bbddd5@intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000287ee805ccd29e3f" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [dpdk-dev] [PATCH] net/bnxt: remove code to initialize SRAM slice node X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" --000000000000287ee805ccd29e3f Content-Transfer-Encoding: 8bit From: Kishore Padmanabha Remove the code to initialize SRAM slice mode explicitly. The code is redundanat as the memory allocated is initialized to zero by the rte_zmalloc. This fixes the compilation issue for uninitialized pointer when debug optimized configuration is used. Signed-off-by: Kishore Padmanabha Reviewed-by: Farah Smith Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/tf_core/tf_sram_mgr.c | 47 -------------------------- 1 file changed, 47 deletions(-) diff --git a/drivers/net/bnxt/tf_core/tf_sram_mgr.c b/drivers/net/bnxt/tf_core/tf_sram_mgr.c index f633a78b25..a248ef2ce8 100644 --- a/drivers/net/bnxt/tf_core/tf_sram_mgr.c +++ b/drivers/net/bnxt/tf_core/tf_sram_mgr.c @@ -407,19 +407,6 @@ tf_sram_is_slice_allocated_in_block(struct tf_sram_block *block, return rc; } -/** - * Initialize slice list - */ -static void -tf_sram_init_slice_list(struct tf_sram_slice_list *slice_list, - enum tf_sram_slice_size slice_size) -{ - slice_list->head = NULL; - slice_list->tail = NULL; - slice_list->cnt = 0; - slice_list->size = slice_size; -} - /** * Get the block count */ @@ -568,11 +555,7 @@ int tf_sram_mgr_bind(void **sram_handle) { int rc = 0; - enum tf_sram_bank_id bank_id; - enum tf_sram_slice_size slice_size; struct tf_sram *sram; - struct tf_sram_slice_list *slice_list; - enum tf_dir dir; struct tfp_calloc_parms cparms; TF_CHECK_PARMS1(sram_handle); @@ -589,37 +572,7 @@ tf_sram_mgr_bind(void **sram_handle) return rc; } sram = (struct tf_sram *)cparms.mem_va; - - /* For each direction - */ - for (dir = 0; dir < TF_DIR_MAX; dir++) { - /* For each bank - */ - for (bank_id = TF_SRAM_BANK_ID_0; - bank_id < TF_SRAM_BANK_ID_MAX; - bank_id++) { - /* Create each sized slice empty list - */ - for (slice_size = TF_SRAM_SLICE_SIZE_8B; - slice_size < TF_SRAM_SLICE_SIZE_MAX; - slice_size++) { - rc = tf_sram_get_slice_list(sram, &slice_list, - slice_size, dir, - bank_id); - if (rc) { - /* Log error */ - TFP_DRV_LOG(ERR, - "No SRAM slice list, rc:%s\n", - strerror(-rc)); - return rc; - } - tf_sram_init_slice_list(slice_list, slice_size); - } - } - } - *sram_handle = sram; - return rc; } -- 2.30.1 (Apple Git-130) --000000000000287ee805ccd29e3f--