]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
UBUNTU: SAUCE: {topost} net: hns3: rename the interface for init_client_instance...
authorPeng Li <lipeng321@huawei.com>
Fri, 13 Apr 2018 02:05:27 +0000 (10:05 +0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Jun 2018 18:41:36 +0000 (14:41 -0400)
BugLink: https://bugs.launchpad.net/bugs/1768670
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 <lipeng321@huawei.com>
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c

index 99faaec319aca594963e2898707f6c6c0ae34dbe..ecb5bd0ab59007fac4d6cba476c1c74d8a607431 100644 (file)
@@ -1594,9 +1594,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) {
@@ -1647,9 +1648,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);
@@ -1660,22 +1663,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;
@@ -1936,8 +1923,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,