diff options
author | Michael J. Ruhl <michael.j.ruhl@intel.com> | 2017-12-19 04:56:44 +0100 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-01-05 19:34:55 +0100 |
commit | 06f2597f75c7ecd9006dd9711ec8c09b4f3d29e3 (patch) | |
tree | d2762276907fbec34b519ce50b8050ab3dc141d9 /drivers/infiniband/hw/hfi1 | |
parent | IB/{rdmavt, hfi1, qib}: Self determine driver name (diff) | |
download | linux-06f2597f75c7ecd9006dd9711ec8c09b4f3d29e3.tar.xz linux-06f2597f75c7ecd9006dd9711ec8c09b4f3d29e3.zip |
IB/{rdmavt, hfi1, qib}: Remove get_card_name() downcall
rdmavt has a down call to client drivers to retrieve a crafted card
name.
This name should be the IB defined name.
Rather than craft the name each time it is needed, simply retrieve
the IB allocated name from the IB device.
Update the function name to reflect its application.
Clean up driver code to match this change.
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1')
-rw-r--r-- | drivers/infiniband/hw/hfi1/driver.c | 8 | ||||
-rw-r--r-- | drivers/infiniband/hw/hfi1/hfi.h | 1 | ||||
-rw-r--r-- | drivers/infiniband/hw/hfi1/verbs.c | 1 |
3 files changed, 0 insertions, 10 deletions
diff --git a/drivers/infiniband/hw/hfi1/driver.c b/drivers/infiniband/hw/hfi1/driver.c index 4f65ac671044..4561719096f2 100644 --- a/drivers/infiniband/hw/hfi1/driver.c +++ b/drivers/infiniband/hw/hfi1/driver.c @@ -167,14 +167,6 @@ const char *get_unit_name(int unit) return iname; } -const char *get_card_name(struct rvt_dev_info *rdi) -{ - struct hfi1_ibdev *ibdev = container_of(rdi, struct hfi1_ibdev, rdi); - struct hfi1_devdata *dd = container_of(ibdev, - struct hfi1_devdata, verbs_dev); - return get_unit_name(dd->unit); -} - struct pci_dev *get_pci_dev(struct rvt_dev_info *rdi) { struct hfi1_ibdev *ibdev = container_of(rdi, struct hfi1_ibdev, rdi); diff --git a/drivers/infiniband/hw/hfi1/hfi.h b/drivers/infiniband/hw/hfi1/hfi.h index 99921acd2ab4..0709aba7c964 100644 --- a/drivers/infiniband/hw/hfi1/hfi.h +++ b/drivers/infiniband/hw/hfi1/hfi.h @@ -1972,7 +1972,6 @@ int get_platform_config_field(struct hfi1_devdata *dd, u32 *data, u32 len); const char *get_unit_name(int unit); -const char *get_card_name(struct rvt_dev_info *rdi); struct pci_dev *get_pci_dev(struct rvt_dev_info *rdi); /* diff --git a/drivers/infiniband/hw/hfi1/verbs.c b/drivers/infiniband/hw/hfi1/verbs.c index 4e68e3f3ce9f..b8776a362a91 100644 --- a/drivers/infiniband/hw/hfi1/verbs.c +++ b/drivers/infiniband/hw/hfi1/verbs.c @@ -1890,7 +1890,6 @@ int hfi1_register_ib_device(struct hfi1_devdata *dd) * Fill in rvt info object. */ dd->verbs_dev.rdi.driver_f.port_callback = hfi1_create_port_files; - dd->verbs_dev.rdi.driver_f.get_card_name = get_card_name; dd->verbs_dev.rdi.driver_f.get_pci_dev = get_pci_dev; dd->verbs_dev.rdi.driver_f.check_ah = hfi1_check_ah; dd->verbs_dev.rdi.driver_f.notify_new_ah = hfi1_notify_new_ah; |