From patchwork Tue Oct 20 22:48:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qi Zhang X-Patchwork-Id: 81641 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 B62B5A04DD; Wed, 21 Oct 2020 00:48:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D31A2ACEA; Wed, 21 Oct 2020 00:45:19 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id D947DACBA for ; Wed, 21 Oct 2020 00:45:06 +0200 (CEST) IronPort-SDR: F0uV5tzMJyE1NBT0Qd6tbAYi8SqvYgXKcQpuLwrfCCzP0y4xzoYwfGvjuBQc1DSMClLyWCQWGr F+NDJabSL0wg== X-IronPort-AV: E=McAfee;i="6000,8403,9780"; a="166510611" X-IronPort-AV: E=Sophos;i="5.77,399,1596524400"; d="scan'208";a="166510611" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2020 15:45:05 -0700 IronPort-SDR: H5VD692YPI8iKgPV+r76EVbD1MUu7In0duror4mxykNW4KT9HSRNUr4iXvcs4/xSqhYLCYrYUl Om8hc3wna3Mg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,399,1596524400"; d="scan'208";a="533254618" Received: from dpdk51.sh.intel.com ([10.67.111.142]) by orsmga005.jf.intel.com with ESMTP; 20 Oct 2020 15:45:04 -0700 From: Qi Zhang To: qiming.yang@intel.com Cc: dev@dpdk.org, Qi Zhang , Bruce Allan Date: Wed, 21 Oct 2020 06:48:35 +0800 Message-Id: <20201020224846.1592682-11-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20201020224846.1592682-1-qi.z.zhang@intel.com> References: <20201020224846.1592682-1-qi.z.zhang@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 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;