Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2222986ybi; Thu, 4 Jul 2019 07:08:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqxWFhTj8WQu+KTvNIcQMof4ZJKI9JYDLRawoQ5IkeFvkLbuuyIeJ+o4HWWkJdkav7o3guzB X-Received: by 2002:a17:902:4c:: with SMTP id 70mr49254185pla.308.1562249284760; Thu, 04 Jul 2019 07:08:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562249284; cv=none; d=google.com; s=arc-20160816; b=UW1LTMwC4fKSnZWScTi0okFPENk9rX05YnpBl3qwqtJWWcHPb6oCua+dqssVOF/GA2 jcmhcwMrBJRPiowZPwWbDUCFwIqKD9h3Ck3eHwTPlh9OmnGFVORdhkXK1CZ7+uIYMi6p EQlrQn+vie9S4g3qv8O9j8gGUlinBn+53P69wE/HJTglEETpQmfDgHIa9JtoQkGdrmvL WVSD8Yaeu04Dn6WCNbZZbnzqfp3uy7eQCkzYUe1ec+J7VxIBidJv1Xu8+DHQjHgOzec+ 0PZuqvRR7QImZC/2g1ZhhAUGCbYOgt6ZbBPp+0LAvmg+aZX4+NfMl8lRUpp16HPzTE4r d6zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=uGeQmC8u8+7S0fW8fSJFw8lBGp9vVQBWeWwcQQEiuZ8=; b=c4BRfxdX5u5LUR3Ix2lz3wjkE0Ar6HrtciZ/0O80wJ+VrwHvYZWmiB6jo6o1DfmJsa B2PH/N0EKH0fw73gpvcb/OEIZmmFC31JK7a3g/u76hP2GZOqwm4r1cIaxhLWPmyb46xP wNBR1p5GD0pZEUzsrKjIyTveUkbL2EOYT6qcGpIWmM7k/DetvjukAL9hVsvp8aaf8qdF k5FG7BLed0WCnh0wvSAW71FBDtJW+I7kbr1NKetI67xXRLCcUf2RcBdsB68PrliolpE9 2kFikFGEtlbv/U/CSPXE2tiXCmdteaosNbcOKoPzHjjrGh7U7S3CdfJO4v1ozit3UaPA QhFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u141si5748720pgb.317.2019.07.04.07.07.50; Thu, 04 Jul 2019 07:08:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727717AbfGDOHA (ORCPT + 99 others); Thu, 4 Jul 2019 10:07:00 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:8702 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726794AbfGDOGb (ORCPT ); Thu, 4 Jul 2019 10:06:31 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 071282E3EF254570DEE0; Thu, 4 Jul 2019 22:06:27 +0800 (CST) Received: from localhost.localdomain (10.67.212.132) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Thu, 4 Jul 2019 22:06:17 +0800 From: Huazhong Tan To: CC: , , , , , Peng Li , Huazhong Tan Subject: [PATCH net-next 7/9] net: hns3: add default value for tc_size and tc_offset Date: Thu, 4 Jul 2019 22:04:26 +0800 Message-ID: <1562249068-40176-8-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1562249068-40176-1-git-send-email-tanhuazhong@huawei.com> References: <1562249068-40176-1-git-send-email-tanhuazhong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.212.132] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Li This patch adds default value for tc_size and tc_offset, or it may get random value and used later. Signed-off-by: Peng Li Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 94c94e1..2abd5f5 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -4092,11 +4092,11 @@ int hclge_rss_init_hw(struct hclge_dev *hdev) struct hclge_vport *vport = hdev->vport; u8 *rss_indir = vport[0].rss_indirection_tbl; u16 rss_size = vport[0].alloc_rss_size; + u16 tc_offset[HCLGE_MAX_TC_NUM] = {0}; + u16 tc_size[HCLGE_MAX_TC_NUM] = {0}; u8 *key = vport[0].rss_hash_key; u8 hfunc = vport[0].rss_algo; - u16 tc_offset[HCLGE_MAX_TC_NUM]; u16 tc_valid[HCLGE_MAX_TC_NUM]; - u16 tc_size[HCLGE_MAX_TC_NUM]; u16 roundup_size; unsigned int i; int ret; @@ -9036,12 +9036,12 @@ static int hclge_set_channels(struct hnae3_handle *handle, u32 new_tqps_num, { struct hclge_vport *vport = hclge_get_vport(handle); struct hnae3_knic_private_info *kinfo = &vport->nic.kinfo; + u16 tc_offset[HCLGE_MAX_TC_NUM] = {0}; struct hclge_dev *hdev = vport->back; + u16 tc_size[HCLGE_MAX_TC_NUM] = {0}; int cur_rss_size = kinfo->rss_size; int cur_tqps = kinfo->num_tqps; - u16 tc_offset[HCLGE_MAX_TC_NUM]; u16 tc_valid[HCLGE_MAX_TC_NUM]; - u16 tc_size[HCLGE_MAX_TC_NUM]; u16 roundup_size; u32 *rss_indir; unsigned int i; -- 2.7.4