Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp7115937imm; Wed, 27 Jun 2018 20:45:36 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLAqNfB0LvMFnd1P2mHMSVNsUsXLfE7x+7a9CXNwBCea/oA3lZvGBS1Bzamm+AglO78fZrZ X-Received: by 2002:a17:902:345:: with SMTP id 63-v6mr8857828pld.328.1530157536286; Wed, 27 Jun 2018 20:45:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530157536; cv=none; d=google.com; s=arc-20160816; b=mciPqh1x95RwN84wRxf2vVtTm8MdWr0TC6aPzwOADRTTRItZzQ7tgakms/JkIOdPdD nEKXVZactTXcEHlqcTAEZufxksh9TXcsEWJP4+hn/Y/gV58TntjcAW0g1Itfw3sYAR0t bz9qX5vbFOaJrpn+4Q127LxFePeNxQrPM2ChWRnnW0lLJ/bj2LxQDMZ0ZmPtIL/rDy3S /73ILWRazuwEPlV1WGpyppRvsEdZygPcvgGTey5dQSJctYtBlGRR/8YStep6GmafKtGl EFNnMmkiXNRMIsBd7sH13mVCPv73soeg+K94FbwU+4Os6xCCOI7xD1hjoR3IZMKlR1so rv5A== 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=jE4dlQx+2IhjsCK8tBMzzxjdlDYC75lOFPzrMOZu4q0=; b=qXNwyezUIGgn+DzGCcJmmvPNF2JZKryXDTRztoFOTCgzx6+oexK9SaoPfDGDsSA4eq A9J2hSg247ptMYf2sSpFtCb3C49y0OVl9fO74eUt/GvF/nWMPe1efjTvuJz66tpueJ7D VrkgqVV4D3ZJeFB/QNPxAa/sGpm6tc5056IcNk8oh56Hb8ulL0sgluS7Itbqkh7wHsju IA3dKHLtEWFznYD72QmlO5c5/nvO9GMfZn2vLLsHcF/XAUefjXOU3uwtfNJ4ZVKCQBRD pD9YzHRex62uqwwrToVNcXDsFh+cLOcGU0CZ0bK65qmOUQabuR2aTdT+u/Ks8P/jJ1c3 m5XA== 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 d5-v6si5510908plo.3.2018.06.27.20.45.22; Wed, 27 Jun 2018 20:45:36 -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 S1753244AbeF1DoK (ORCPT + 99 others); Wed, 27 Jun 2018 23:44:10 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:8738 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753002AbeF1DlM (ORCPT ); Wed, 27 Jun 2018 23:41:12 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 296ABF0E09C8C; Thu, 28 Jun 2018 11:40:58 +0800 (CST) Received: from linux-ioko.site (10.71.200.31) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.382.0; Thu, 28 Jun 2018 11:40:52 +0800 From: Peng Li To: CC: , , , , , Subject: [PATCH net-next 02/11] net: hns3: rename the interface for init_client_instance and uninit_client_instance Date: Thu, 28 Jun 2018 12:12:20 +0800 Message-ID: <1530159149-122284-3-git-send-email-lipeng321@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1530159149-122284-1-git-send-email-lipeng321@huawei.com> References: <1530159149-122284-1-git-send-email-lipeng321@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.71.200.31] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The interface init_client_instance and uninit_client_instance do not register anything, only initialize the client instance. This patch rename the related interface to make the function name to indicate the purpose. Signed-off-by: Peng Li --- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 31 +++++++--------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c index b3d8237..3a8d7e0 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c @@ -1586,9 +1586,10 @@ static void hclgevf_misc_irq_uninit(struct hclgevf_dev *hdev) hclgevf_free_vector(hdev, 0); } -static int hclgevf_init_instance(struct hclgevf_dev *hdev, - struct hnae3_client *client) +static int hclgevf_init_client_instance(struct hnae3_client *client, + struct hnae3_ae_dev *ae_dev) { + struct hclgevf_dev *hdev = ae_dev->priv; int ret; switch (client->type) { @@ -1639,9 +1640,11 @@ static int hclgevf_init_instance(struct hclgevf_dev *hdev, return 0; } -static void hclgevf_uninit_instance(struct hclgevf_dev *hdev, - struct hnae3_client *client) +static void hclgevf_uninit_client_instance(struct hnae3_client *client, + struct hnae3_ae_dev *ae_dev) { + struct hclgevf_dev *hdev = ae_dev->priv; + /* un-init roce, if it exists */ if (hdev->roce_client) hdev->roce_client->ops->uninit_instance(&hdev->roce, 0); @@ -1652,22 +1655,6 @@ static void hclgevf_uninit_instance(struct hclgevf_dev *hdev, client->ops->uninit_instance(&hdev->nic, 0); } -static int hclgevf_register_client(struct hnae3_client *client, - struct hnae3_ae_dev *ae_dev) -{ - struct hclgevf_dev *hdev = ae_dev->priv; - - return hclgevf_init_instance(hdev, client); -} - -static void hclgevf_unregister_client(struct hnae3_client *client, - struct hnae3_ae_dev *ae_dev) -{ - struct hclgevf_dev *hdev = ae_dev->priv; - - hclgevf_uninit_instance(hdev, client); -} - static int hclgevf_pci_init(struct hclgevf_dev *hdev) { struct pci_dev *pdev = hdev->pdev; @@ -1928,8 +1915,8 @@ void hclgevf_update_speed_duplex(struct hclgevf_dev *hdev, u32 speed, static const struct hnae3_ae_ops hclgevf_ops = { .init_ae_dev = hclgevf_init_ae_dev, .uninit_ae_dev = hclgevf_uninit_ae_dev, - .init_client_instance = hclgevf_register_client, - .uninit_client_instance = hclgevf_unregister_client, + .init_client_instance = hclgevf_init_client_instance, + .uninit_client_instance = hclgevf_uninit_client_instance, .start = hclgevf_ae_start, .stop = hclgevf_ae_stop, .map_ring_to_vector = hclgevf_map_ring_to_vector, -- 2.9.3