From patchwork Sun Oct 25 00:29:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qi Zhang X-Patchwork-Id: 82077 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3879AA04B5; Sun, 25 Oct 2020 02:29:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9A5982BE1; Sun, 25 Oct 2020 02:26:28 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id A799C98 for ; Sun, 25 Oct 2020 02:26:12 +0200 (CEST) IronPort-SDR: 0igJ1LaLzppevVKkr71wDyMPAtnc90VvC0QZyIRvX3DZFBfvSB2H/BxOpd+ccSzwEZ2emJLqWq 9LICGgUEISWw== X-IronPort-AV: E=McAfee;i="6000,8403,9784"; a="167927038" X-IronPort-AV: E=Sophos;i="5.77,414,1596524400"; d="scan'208";a="167927038" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2020 17:26:11 -0700 IronPort-SDR: DObtZF2/yZdcVHlmn6Vk9uhi0SapXYPYZfKO0pp8LvHRJz4zlc+dsX5PKNs5sPhBCQR6qq0Own FXirLO7/QXYQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,414,1596524400"; d="scan'208";a="359984060" Received: from dpdk51.sh.intel.com ([10.67.111.142]) by FMSMGA003.fm.intel.com with ESMTP; 24 Oct 2020 17:26:10 -0700 From: Qi Zhang To: qiming.yang@intel.com Cc: dev@dpdk.org, Qi Zhang , Bruce Allan Date: Sun, 25 Oct 2020 08:29:42 +0800 Message-Id: <20201025002953.1680999-11-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20201025002953.1680999-1-qi.z.zhang@intel.com> References: <20201025002953.1680999-1-qi.z.zhang@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 10/21] net/ice/base: use malloc instead of calloc X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Use *malloc() instead of *calloc() when allocating only a single object as opposed to an array of objects. Signed-off-by: Bruce Allan Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_switch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index cd78685735..dc55d7e3ce 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -3366,8 +3366,7 @@ ice_create_vsi_list_map(struct ice_hw *hw, u16 *vsi_handle_arr, u16 num_vsi, struct ice_vsi_list_map_info *v_map; int i; - v_map = (struct ice_vsi_list_map_info *)ice_calloc(hw, 1, - sizeof(*v_map)); + v_map = (struct ice_vsi_list_map_info *)ice_malloc(hw, sizeof(*v_map)); if (!v_map) return NULL;