From patchwork Thu Jul 19 14:47:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 142349 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1823108ljj; Thu, 19 Jul 2018 07:48:24 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcqDONuhaLoDi2YBaQFzJXOYP2ZekgKbpRnjG0dprTkz+/hQu6pXbVxWuH2oNXp7kYctby+ X-Received: by 2002:a62:c8c2:: with SMTP id i63-v6mr9909390pfk.73.1532011704017; Thu, 19 Jul 2018 07:48:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532011704; cv=none; d=google.com; s=arc-20160816; b=fPwEkxi2uOn50isAvRXzoDRSmcffy9w+vN67iVb2uKoZLwXYhMkprS3etCQ91oNl24 qGz1rezrbf6xxKdZIAWUIX1H4ogeUjdxZsO0bHCkqLCkFNDpn46PMV0hpvI0rAmKChMt eyV7g5eaRQNeTJYTwoscMVz6Fh3U0jkU6mGBf8lgD4Ah08g5WiT5UAuNxiCv4vq5+EyO 2zRc91A2vjJmR76PUd8hNymAchr7KDk/OdjrmnN21SFETFXcwxYVtNW8AilcBsAE99VH X02tR2CFAYqm9UX0t0PRYwXxcNnoEcvpxc1+HTXY/3SRMZOHeG5ewNqrD+GXmnoTchqM ZyOw== 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:arc-authentication-results; bh=t4VkGlB+d8q1+v+sSUVvBRR2hbKcuofQQNDd2Rx7eXo=; b=X1Ia39+e1IJxCo5KxMPj3rNjlwMyCXqe/182ADD6JK/WoUovhb2fzPDNB07UKafTug YQgDdcxJbEVSPTamCSPKBv4XXMuCkrQQ9Sh3UNodcaa+rIiwC0yW3Tfk0XMWRDBlIN/5 LC3Du0QQrausWqjhUdov2l5N9QjR1rM334imMw1tEtfl3t5TZJz0L0tP+7iJCmoTQ7EY friONQD+daFIOtNX9VCSUrJ+LgtKizR7FykudodMCyZ6GWY4AxzR1fuJha3dfF40BLc6 jTtF4BviHXqR+Vp879XQ/bTStuZUAEeSzB1puZgpw0QX8M2mbMWVuGy7x49GHzxVzD1W f05Q== 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 f4-v6si6167270pfj.97.2018.07.19.07.48.23; Thu, 19 Jul 2018 07:48:24 -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 S1732004AbeGSPbv (ORCPT + 31 others); Thu, 19 Jul 2018 11:31:51 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:54326 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730521AbeGSPbu (ORCPT ); Thu, 19 Jul 2018 11:31:50 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 7E4D2A1DF6FE; Thu, 19 Jul 2018 22:48:15 +0800 (CST) Received: from S00293818-DELL1.huawei.com (10.202.226.54) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.382.0; Thu, 19 Jul 2018 22:48:06 +0800 From: Salil Mehta To: CC: , , , , , , , Jian Shen Subject: [PATCH net-next 7/9] net: hns3: Fix misleading parameter name Date: Thu, 19 Jul 2018 15:47:04 +0100 Message-ID: <20180719144706.644-8-salil.mehta@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180719144706.644-1-salil.mehta@huawei.com> References: <20180719144706.644-1-salil.mehta@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.202.226.54] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jian Shen The input parameter "dev" of hns3_irq_handle() is indeed used as a tqp vector, it is misleadin. The struct member "flag" is used to indicate ring type, so rename it. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 ++-- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 4 ++-- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index 29be96e..ba2797e 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -62,9 +62,9 @@ static const struct pci_device_id hns3_pci_tbl[] = { }; MODULE_DEVICE_TABLE(pci, hns3_pci_tbl); -static irqreturn_t hns3_irq_handle(int irq, void *dev) +static irqreturn_t hns3_irq_handle(int irq, void *vector) { - struct hns3_enet_tqp_vector *tqp_vector = dev; + struct hns3_enet_tqp_vector *tqp_vector = vector; napi_schedule(&tqp_vector->napi); diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c index cf40afc..68356da 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c @@ -72,7 +72,7 @@ static int hclge_alloc_cmd_queue(struct hclge_dev *hdev, int ring_type) (ring_type == HCLGE_TYPE_CSQ) ? &hw->cmq.csq : &hw->cmq.crq; int ret; - ring->flag = ring_type; + ring->ring_type = ring_type; ring->dev = hdev; ret = hclge_alloc_cmd_desc(ring); @@ -111,7 +111,7 @@ static void hclge_cmd_config_regs(struct hclge_cmq_ring *ring) struct hclge_dev *hdev = ring->dev; struct hclge_hw *hw = &hdev->hw; - if (ring->flag == HCLGE_TYPE_CSQ) { + if (ring->ring_type == HCLGE_TYPE_CSQ) { hclge_write_dev(hw, HCLGE_NIC_CSQ_BASEADDR_L_REG, lower_32_bits(dma)); hclge_write_dev(hw, HCLGE_NIC_CSQ_BASEADDR_H_REG, diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h index ec7b8d7..54e199d 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h @@ -45,7 +45,7 @@ struct hclge_cmq_ring { u16 desc_num; int next_to_use; int next_to_clean; - u8 flag; + u8 ring_type; /* cmq ring type */ spinlock_t lock; /* Command queue lock */ };