IB/qib: Rename several functions by adding a "qib_" prefix
authorHarish Chegondi <harish.chegondi@intel.com>
Sun, 14 Feb 2016 20:09:55 +0000 (12:09 -0800)
committerDoug Ledford <dledford@redhat.com>
Fri, 11 Mar 2016 01:38:07 +0000 (20:38 -0500)
This would avoid conflict with the functions in hfi1 that have similar
names when both qib and hfi1 drivers are configured to be built into
the kernel. This issue came up in the 0-day build report.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Harish Chegondi <harish.chegondi@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/qib/qib.h
drivers/infiniband/hw/qib/qib_qp.c
drivers/infiniband/hw/qib/qib_verbs.c
drivers/infiniband/hw/qib/qib_verbs.h

index 5ba073ecd6392efe0cf8dcd2d1e211a9d0f1c3d4..bbf0a163aeab51d570ef2a4b3dba3e9fd3c2e25f 100644 (file)
@@ -1540,13 +1540,13 @@ void qib_format_hwerrors(u64 hwerrs,
                         const struct qib_hwerror_msgs *hwerrmsgs,
                         size_t nhwerrmsgs, char *msg, size_t lmsg);
 
-void stop_send_queue(struct rvt_qp *qp);
-void quiesce_qp(struct rvt_qp *qp);
-void flush_qp_waiters(struct rvt_qp *qp);
-int mtu_to_path_mtu(u32 mtu);
-u32 mtu_from_qp(struct rvt_dev_info *rdi, struct rvt_qp *qp, u32 pmtu);
-void notify_error_qp(struct rvt_qp *qp);
-int get_pmtu_from_attr(struct rvt_dev_info *rdi, struct rvt_qp *qp,
-                      struct ib_qp_attr *attr);
+void qib_stop_send_queue(struct rvt_qp *qp);
+void qib_quiesce_qp(struct rvt_qp *qp);
+void qib_flush_qp_waiters(struct rvt_qp *qp);
+int qib_mtu_to_path_mtu(u32 mtu);
+u32 qib_mtu_from_qp(struct rvt_dev_info *rdi, struct rvt_qp *qp, u32 pmtu);
+void qib_notify_error_qp(struct rvt_qp *qp);
+int qib_get_pmtu_from_attr(struct rvt_dev_info *rdi, struct rvt_qp *qp,
+                          struct ib_qp_attr *attr);
 
 #endif                          /* _QIB_KERNEL_H */
index 787116f59395ea8adf437632b0f1ef80687a7251..01d49dc91de22d2742a5b92b55f61d525743669e 100644 (file)
@@ -127,8 +127,8 @@ static void get_map_page(struct rvt_qpn_table *qpt, struct rvt_qpn_map *map,
  * Allocate the next available QPN or
  * zero/one for QP type IB_QPT_SMI/IB_QPT_GSI.
  */
-int alloc_qpn(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt,
-             enum ib_qp_type type, u8 port, gfp_t gfp)
+int qib_alloc_qpn(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt,
+                 enum ib_qp_type type, u8 port, gfp_t gfp)
 {
        u32 i, offset, max_scan, qpn;
        struct rvt_qpn_map *map;
@@ -232,14 +232,14 @@ unsigned qib_free_all_qps(struct rvt_dev_info *rdi)
        return qp_inuse;
 }
 
-void notify_qp_reset(struct rvt_qp *qp)
+void qib_notify_qp_reset(struct rvt_qp *qp)
 {
        struct qib_qp_priv *priv = qp->priv;
 
        atomic_set(&priv->s_dma_busy, 0);
 }
 
-void notify_error_qp(struct rvt_qp *qp)
+void qib_notify_error_qp(struct rvt_qp *qp)
 {
        struct qib_qp_priv *priv = qp->priv;
        struct qib_ibdev *dev = to_idev(qp->ibqp.device);
@@ -290,8 +290,8 @@ static int mtu_to_enum(u32 mtu)
        return enum_mtu;
 }
 
-int get_pmtu_from_attr(struct rvt_dev_info *rdi, struct rvt_qp *qp,
-                      struct ib_qp_attr *attr)
+int qib_get_pmtu_from_attr(struct rvt_dev_info *rdi, struct rvt_qp *qp,
+                          struct ib_qp_attr *attr)
 {
        int mtu, pmtu, pidx = qp->port_num - 1;
        struct qib_ibdev *verbs_dev = container_of(rdi, struct qib_ibdev, rdi);
@@ -308,12 +308,12 @@ int get_pmtu_from_attr(struct rvt_dev_info *rdi, struct rvt_qp *qp,
        return pmtu;
 }
 
-int mtu_to_path_mtu(u32 mtu)
+int qib_mtu_to_path_mtu(u32 mtu)
 {
        return mtu_to_enum(mtu);
 }
 
-u32 mtu_from_qp(struct rvt_dev_info *rdi, struct rvt_qp *qp, u32 pmtu)
+u32 qib_mtu_from_qp(struct rvt_dev_info *rdi, struct rvt_qp *qp, u32 pmtu)
 {
        return ib_mtu_enum_to_int(pmtu);
 }
@@ -378,7 +378,7 @@ __be32 qib_compute_aeth(struct rvt_qp *qp)
        return cpu_to_be32(aeth);
 }
 
-void *qp_priv_alloc(struct rvt_dev_info *rdi, struct rvt_qp *qp, gfp_t gfp)
+void *qib_qp_priv_alloc(struct rvt_dev_info *rdi, struct rvt_qp *qp, gfp_t gfp)
 {
        struct qib_qp_priv *priv;
 
@@ -399,7 +399,7 @@ void *qp_priv_alloc(struct rvt_dev_info *rdi, struct rvt_qp *qp, gfp_t gfp)
        return priv;
 }
 
-void qp_priv_free(struct rvt_dev_info *rdi, struct rvt_qp *qp)
+void qib_qp_priv_free(struct rvt_dev_info *rdi, struct rvt_qp *qp)
 {
        struct qib_qp_priv *priv = qp->priv;
 
@@ -407,7 +407,7 @@ void qp_priv_free(struct rvt_dev_info *rdi, struct rvt_qp *qp)
        kfree(priv);
 }
 
-void stop_send_queue(struct rvt_qp *qp)
+void qib_stop_send_queue(struct rvt_qp *qp)
 {
        struct qib_qp_priv *priv = qp->priv;
 
@@ -415,7 +415,7 @@ void stop_send_queue(struct rvt_qp *qp)
        del_timer_sync(&qp->s_timer);
 }
 
-void quiesce_qp(struct rvt_qp *qp)
+void qib_quiesce_qp(struct rvt_qp *qp)
 {
        struct qib_qp_priv *priv = qp->priv;
 
@@ -426,7 +426,7 @@ void quiesce_qp(struct rvt_qp *qp)
        }
 }
 
-void flush_qp_waiters(struct rvt_qp *qp)
+void qib_flush_qp_waiters(struct rvt_qp *qp)
 {
        struct qib_qp_priv *priv = qp->priv;
        struct qib_ibdev *dev = to_idev(qp->ibqp.device);
index 2abe31d4e35065b8ceaa2920fcf34a877acfb362..fa94f78073cf77c3da33bcea53c34ea76082369b 100644 (file)
@@ -1394,7 +1394,7 @@ bail:
        return ret;
 }
 
-static int shut_down_port(struct rvt_dev_info *rdi, u8 port_num)
+static int qib_shut_down_port(struct rvt_dev_info *rdi, u8 port_num)
 {
        struct qib_ibdev *ibdev = container_of(rdi, struct qib_ibdev, rdi);
        struct qib_devdata *dd = dd_from_dev(ibdev);
@@ -1663,22 +1663,22 @@ int qib_register_ib_device(struct qib_devdata *dd)
        dd->verbs_dev.rdi.driver_f.get_pci_dev = qib_get_pci_dev;
        dd->verbs_dev.rdi.driver_f.check_ah = qib_check_ah;
        dd->verbs_dev.rdi.driver_f.notify_new_ah = qib_notify_new_ah;
-       dd->verbs_dev.rdi.driver_f.alloc_qpn = alloc_qpn;
-       dd->verbs_dev.rdi.driver_f.qp_priv_alloc = qp_priv_alloc;
-       dd->verbs_dev.rdi.driver_f.qp_priv_free = qp_priv_free;
+       dd->verbs_dev.rdi.driver_f.alloc_qpn = qib_alloc_qpn;
+       dd->verbs_dev.rdi.driver_f.qp_priv_alloc = qib_qp_priv_alloc;
+       dd->verbs_dev.rdi.driver_f.qp_priv_free = qib_qp_priv_free;
        dd->verbs_dev.rdi.driver_f.free_all_qps = qib_free_all_qps;
-       dd->verbs_dev.rdi.driver_f.notify_qp_reset = notify_qp_reset;
+       dd->verbs_dev.rdi.driver_f.notify_qp_reset = qib_notify_qp_reset;
        dd->verbs_dev.rdi.driver_f.do_send = qib_do_send;
        dd->verbs_dev.rdi.driver_f.schedule_send = qib_schedule_send;
-       dd->verbs_dev.rdi.driver_f.quiesce_qp = quiesce_qp;
-       dd->verbs_dev.rdi.driver_f.stop_send_queue = stop_send_queue;
-       dd->verbs_dev.rdi.driver_f.flush_qp_waiters = flush_qp_waiters;
-       dd->verbs_dev.rdi.driver_f.notify_error_qp = notify_error_qp;
-       dd->verbs_dev.rdi.driver_f.mtu_to_path_mtu = mtu_to_path_mtu;
-       dd->verbs_dev.rdi.driver_f.mtu_from_qp = mtu_from_qp;
-       dd->verbs_dev.rdi.driver_f.get_pmtu_from_attr = get_pmtu_from_attr;
+       dd->verbs_dev.rdi.driver_f.quiesce_qp = qib_quiesce_qp;
+       dd->verbs_dev.rdi.driver_f.stop_send_queue = qib_stop_send_queue;
+       dd->verbs_dev.rdi.driver_f.flush_qp_waiters = qib_flush_qp_waiters;
+       dd->verbs_dev.rdi.driver_f.notify_error_qp = qib_notify_error_qp;
+       dd->verbs_dev.rdi.driver_f.mtu_to_path_mtu = qib_mtu_to_path_mtu;
+       dd->verbs_dev.rdi.driver_f.mtu_from_qp = qib_mtu_from_qp;
+       dd->verbs_dev.rdi.driver_f.get_pmtu_from_attr = qib_get_pmtu_from_attr;
        dd->verbs_dev.rdi.driver_f.query_port_state = qib_query_port;
-       dd->verbs_dev.rdi.driver_f.shut_down_port = shut_down_port;
+       dd->verbs_dev.rdi.driver_f.shut_down_port = qib_shut_down_port;
        dd->verbs_dev.rdi.driver_f.cap_mask_chg = qib_cap_mask_chg;
 
        dd->verbs_dev.rdi.dparms.max_rdma_atomic = QIB_MAX_RDMA_ATOMIC;
index cd73a97e395bea221c2d2add2d358fd64c1e3a5b..b88e027b6cb0899eb924eec67b79dc294733d210 100644 (file)
@@ -350,11 +350,11 @@ __be32 qib_compute_aeth(struct rvt_qp *qp);
  * Functions provided by qib driver for rdmavt to use
  */
 unsigned qib_free_all_qps(struct rvt_dev_info *rdi);
-void *qp_priv_alloc(struct rvt_dev_info *rdi, struct rvt_qp *qp, gfp_t gfp);
-void qp_priv_free(struct rvt_dev_info *rdi, struct rvt_qp *qp);
-void notify_qp_reset(struct rvt_qp *qp);
-int alloc_qpn(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt,
-             enum ib_qp_type type, u8 port, gfp_t gfp);
+void *qib_qp_priv_alloc(struct rvt_dev_info *rdi, struct rvt_qp *qp, gfp_t gfp);
+void qib_qp_priv_free(struct rvt_dev_info *rdi, struct rvt_qp *qp);
+void qib_notify_qp_reset(struct rvt_qp *qp);
+int qib_alloc_qpn(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt,
+                 enum ib_qp_type type, u8 port, gfp_t gfp);
 
 #ifdef CONFIG_DEBUG_FS