]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
qed: Replace set_id() api with set_name()
authorMintz, Yuval <Yuval.Mintz@cavium.com>
Tue, 23 May 2017 06:41:28 +0000 (09:41 +0300)
committerChuck Anderson <chuck.anderson@oracle.com>
Tue, 19 Sep 2017 05:32:15 +0000 (22:32 -0700)
Orabug: 26783820

Current API between qed and protocol modules allows passing an
additional private string - but it doesn't get utilized by qed
anywhere.

Clarify the API by removing it and renaming it 'set_name'.

CC: Manish Rangankar <Manish.Rangankar@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 712c3cbf193fcadf0ba67da61432beb1a71e400b ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
drivers/net/ethernet/qlogic/qed/qed.h
drivers/net/ethernet/qlogic/qed/qed_main.c
drivers/net/ethernet/qlogic/qede/qede_main.c
include/linux/qed/qed_if.h

index 2484e2e599dbbc08486c8916e808cd8f333d6a9a..54509c9b5c8a9de8ec2ce73c3d223f9a375739b2 100644 (file)
@@ -639,7 +639,6 @@ struct qed_dev {
 
        int                             pcie_width;
        int                             pcie_speed;
-       u8                              ver_str[VER_SIZE];
 
        /* Add MF related configuration */
        u8                              mcp_rev;
index 1aecf146ed4cc7fd932838d01d859e0d64f8fc07..ba1e16937b2ddb09cbb1aa10c5b2074aafa84adc 100644 (file)
@@ -338,6 +338,7 @@ static struct qed_dev *qed_probe(struct pci_dev *pdev,
        if (!cdev)
                goto err0;
 
+       cdev->drv_type = DRV_ID_DRV_TYPE_LINUX;
        cdev->protocol = params->protocol;
 
        if (params->is_vf)
@@ -1129,17 +1130,13 @@ static int qed_slowpath_stop(struct qed_dev *cdev)
        return 0;
 }
 
-static void qed_set_id(struct qed_dev *cdev, char name[NAME_SIZE],
-                      char ver_str[VER_SIZE])
+static void qed_set_name(struct qed_dev *cdev, char name[NAME_SIZE])
 {
        int i;
 
        memcpy(cdev->name, name, NAME_SIZE);
        for_each_hwfn(cdev, i)
                snprintf(cdev->hwfns[i].name, NAME_SIZE, "%s-%d", name, i);
-
-       memcpy(cdev->ver_str, ver_str, VER_SIZE);
-       cdev->drv_type = DRV_ID_DRV_TYPE_LINUX;
 }
 
 static u32 qed_sb_init(struct qed_dev *cdev,
@@ -1689,7 +1686,7 @@ const struct qed_common_ops qed_common_ops_pass = {
        .probe = &qed_probe,
        .remove = &qed_remove,
        .set_power_state = &qed_set_power_state,
-       .set_id = &qed_set_id,
+       .set_name = &qed_set_name,
        .update_pf_params = &qed_update_pf_params,
        .slowpath_start = &qed_slowpath_start,
        .slowpath_stop = &qed_slowpath_stop,
index 308c79774cf99e1338be5eac633fe985230cda4d..4547f6ec3a94d1f851d8157542653cd7eac45a55 100644 (file)
@@ -254,7 +254,7 @@ static int qede_netdev_event(struct notifier_block *this, unsigned long event,
                /* Notify qed of the name change */
                if (!edev->ops || !edev->ops->common)
                        goto done;
-               edev->ops->common->set_id(edev->cdev, edev->ndev->name, "qede");
+               edev->ops->common->set_name(edev->cdev, edev->ndev->name);
                break;
        case NETDEV_CHANGEADDR:
                edev = netdev_priv(ndev);
@@ -1021,7 +1021,7 @@ static int __qede_probe(struct pci_dev *pdev, u32 dp_module, u8 dp_level,
                goto err4;
        }
 
-       edev->ops->common->set_id(cdev, edev->ndev->name, DRV_MODULE_VERSION);
+       edev->ops->common->set_name(cdev, edev->ndev->name);
 
        /* PTP not supported on VFs */
        if (!is_vf)
index 2d3dae1473aeb853befaa1a006ae4bea5f11f45f..1aa75a7c27c89e827ef0d3b98f56b89f6a52a461 100644 (file)
@@ -521,9 +521,7 @@ struct qed_common_ops {
        int             (*set_power_state)(struct qed_dev *cdev,
                                           pci_power_t state);
 
-       void            (*set_id)(struct qed_dev *cdev,
-                                 char name[],
-                                 char ver_str[]);
+       void (*set_name) (struct qed_dev *cdev, char name[]);
 
        /* Client drivers need to make this call before slowpath_start.
         * PF params required for the call before slowpath_start is