From patchwork Mon Apr 5 17:28:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 415304 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3855815jai; Mon, 5 Apr 2021 10:29:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDFcTMkzSmqu/6pJZdgptKg/E8oWTrT44Vti9A06jT8DUJq7yTMukuIEJNGrF/wbBVXt+z X-Received: by 2002:a92:c549:: with SMTP id a9mr21088573ilj.300.1617643777270; Mon, 05 Apr 2021 10:29:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617643777; cv=none; d=google.com; s=arc-20160816; b=n0Nfc8K5bieYxiCRw1n3liVPXfoj5TPiDy/m6E/Ibv3nrDeHLut94vfrzv5opgVWJf wwvAxZ6upIy83ZJyGbnFt9GTvWEB+BlkvnlVaoBUyn8SjtMo8u8rC/i/xZDeQJFIEyti 0ntq2Wv/RYr89q/yP6NtKal4cOuZyAQfcc4otGkTDu13Wah7FFpblfyHGIvhOKI0OzbI bcd0qUkmNhEn4d5lnGtT9zWZ1msNFtCAXr6QcLrok9y/QGVQPEEiYA+JfmdKNHLNzKSl kAOhKohrQzmGF19UYLQRt3OTIFdd2DiQRAhQq6iqT8eMzXWFu+zoF9ANpbAWH6jmuqrx CVcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=d4V6KYwTOf22oUxudrUD7wWY8fr5veC2984N+BJ3rmY=; b=nw++5Wwxv7/GYEqNW8ITqmIBihbSNWb3mL1BDmLcVyGNifvojIhzNwqhuZ5MdqrJ9j W7b/Jq2BTug4uL+L377PS9uDgrMIWLQawjZx3pOwR2xgCLwanocMa/qFqc66UHJaipLZ 6Zd6ETs8VBoFl9/UGSBKocReMMfowAcJYhRS766Aq5h3qxg7o9BC8oEqR44XvMBkaUUj /8N1TWgZT/pbJbhJT9o74AsQjpFLhbsgNmKKhbJJDKiH9hULc0OgZXMs3NBdTdkayOHF HlH/EY1p+204RLfexONbsg6vcavL+oCP18DW+h4C9xpW9YqCWXbCoTAlJQZqbOXXg6zg BNDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t15si15167809ioh.77.2021.04.05.10.29.37; Mon, 05 Apr 2021 10:29:37 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238481AbhDER3m (ORCPT + 8 others); Mon, 5 Apr 2021 13:29:42 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:15482 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238299AbhDER3l (ORCPT ); Mon, 5 Apr 2021 13:29:41 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FDczc1x2YzwR1P; Tue, 6 Apr 2021 01:27:24 +0800 (CST) Received: from A190218597.china.huawei.com (10.47.69.183) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.498.0; Tue, 6 Apr 2021 01:29:23 +0800 From: Salil Mehta To: , CC: , , , , Subject: [PATCH net] net: hns3: Limiting the scope of vector_ring_chain variable Date: Mon, 5 Apr 2021 18:28:25 +0100 Message-ID: <20210405172825.28380-1-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 MIME-Version: 1.0 X-Originating-IP: [10.47.69.183] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Limiting the scope of the variable vector_ring_chain to the block where it is used. Fixes: 424eb834a9be ("net: hns3: Unified HNS3 {VF|PF} Ethernet Driver for hip08 SoC") Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index bf4302a5cf95..65752f363f43 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -3704,7 +3704,6 @@ static void hns3_nic_set_cpumask(struct hns3_nic_priv *priv) static int hns3_nic_init_vector_data(struct hns3_nic_priv *priv) { - struct hnae3_ring_chain_node vector_ring_chain; struct hnae3_handle *h = priv->ae_handle; struct hns3_enet_tqp_vector *tqp_vector; int ret; @@ -3736,6 +3735,8 @@ static int hns3_nic_init_vector_data(struct hns3_nic_priv *priv) } for (i = 0; i < priv->vector_num; i++) { + struct hnae3_ring_chain_node vector_ring_chain; + tqp_vector = &priv->tqp_vector[i]; tqp_vector->rx_group.total_bytes = 0;