--- initial
+++ final
@@ -1,99 +1,99 @@
 void opa_vnic_vema_send_trap(struct opa_vnic_adapter *adapter, struct __opa_veswport_trap *data, u32 lid) {
   struct opa_vnic_ctrl_port *cport = adapter->cport;
   struct ib_mad_send_buf *send_buf;
   struct opa_vnic_vema_port *port;
   struct ib_device *ibp;
   struct opa_vnic_vema_mad_trap *trap_mad;
   struct opa_class_port_info *class;
   struct rdma_ah_attr ah_attr;
   struct ib_ah *ah;
   struct opa_veswport_trap *trap;
   u32 trap_lid;
   u16 pkey_idx;
   if (!cport) goto err_exit;
   ibp = cport->ibdev;
   port = vema_get_port(cport, data->opaportnum);
   if (!port || !port->mad_agent) goto err_exit;
   if (time_before(jiffies, adapter->trap_timeout)) {
     if (adapter->trap_count == OPA_VNIC_TRAP_BURST_LIMIT) {
       v_warn("Trap rate exceeded\n");
       goto err_exit;
     } else {
       adapter->trap_count++;
     }
   } else {
     adapter->trap_count = 0;
   }
   class = &port->class_port_info;
   /* Set up address handle */
   memset(&ah_attr, 0, sizeof(ah_attr));
   ah_attr.sl = GET_TRAP_SL_FROM_CLASS_PORT_INFO(class->trap_sl_rsvd);
   ah_attr.port_num = port->port_num;
   trap_lid = be32_to_cpu(class->trap_lid);
   /*
    * check for trap lid validity, must not be zero
    * The trap sink could change after we fashion the MAD but since traps
    * are not guaranteed we won't use a lock as anyway the change will take
    * place even with locking.
    */
   if (!trap_lid) {
     c_err("%s: Invalid dlid\n", __func__);
     goto err_exit;
   }
   ah_attr.dlid = trap_lid;
-  ah = ib_create_ah(port->mad_agent->qp->pd, &ah_attr);
+  ah = rdma_create_ah(port->mad_agent->qp->pd, &ah_attr);
   if (IS_ERR(ah)) {
     c_err("%s:Couldn't create new AH = %p\n", __func__, ah);
     c_err("%s:dlid = %d, sl = %d, port = %d\n", __func__, ah_attr.dlid, ah_attr.sl, ah_attr.port_num);
     goto err_exit;
   }
   if (ib_find_pkey(ibp, data->opaportnum, IB_DEFAULT_PKEY_FULL, &pkey_idx) < 0) {
     c_err("%s:full key not found, defaulting to partial\n", __func__);
     if (ib_find_pkey(ibp, data->opaportnum, IB_DEFAULT_PKEY_PARTIAL, &pkey_idx) < 0) pkey_idx = 1;
   }
   send_buf = ib_create_send_mad(port->mad_agent, 1, pkey_idx, 0, IB_MGMT_VENDOR_HDR, IB_MGMT_MAD_DATA, GFP_KERNEL, OPA_MGMT_BASE_VERSION);
   if (IS_ERR(send_buf)) {
     c_err("%s:Couldn't allocate send buf\n", __func__);
     goto err_sndbuf;
   }
   send_buf->ah = ah;
   /* Set up common MAD hdr */
   trap_mad = send_buf->mad;
   trap_mad->mad_hdr.base_version = OPA_MGMT_BASE_VERSION;
   trap_mad->mad_hdr.mgmt_class = OPA_MGMT_CLASS_INTEL_EMA;
   trap_mad->mad_hdr.class_version = OPA_EMA_CLASS_VERSION;
   trap_mad->mad_hdr.method = IB_MGMT_METHOD_TRAP;
   port->tid++;
   trap_mad->mad_hdr.tid = cpu_to_be64(port->tid);
   trap_mad->mad_hdr.attr_id = IB_SMP_ATTR_NOTICE;
   /* Set up vendor OUI */
   trap_mad->oui[0] = INTEL_OUI_1;
   trap_mad->oui[1] = INTEL_OUI_2;
   trap_mad->oui[2] = INTEL_OUI_3;
   /* Setup notice attribute portion */
   trap_mad->notice.gen_type = OPA_INTEL_EMA_NOTICE_TYPE_INFO << 1;
   trap_mad->notice.oui_1 = INTEL_OUI_1;
   trap_mad->notice.oui_2 = INTEL_OUI_2;
   trap_mad->notice.oui_3 = INTEL_OUI_3;
   trap_mad->notice.issuer_lid = cpu_to_be32(lid);
   /* copy the actual trap data */
   trap = (struct opa_veswport_trap *)trap_mad->notice.raw_data;
   trap->fabric_id = cpu_to_be16(data->fabric_id);
   trap->veswid = cpu_to_be16(data->veswid);
   trap->veswportnum = cpu_to_be32(data->veswportnum);
   trap->opaportnum = cpu_to_be16(data->opaportnum);
   trap->veswportindex = data->veswportindex;
   trap->opcode = data->opcode;
   /* If successful send set up rate limit timeout else bail */
   if (ib_post_send_mad(send_buf, NULL)) {
     ib_free_send_mad(send_buf);
   } else {
     if (adapter->trap_count) return;
     adapter->trap_timeout = jiffies + usecs_to_jiffies(OPA_VNIC_TRAP_TIMEOUT);
     return;
   }
 err_sndbuf:
   ib_destroy_ah(ah);
 err_exit:
   v_err("Aborting trap\n");
 }<sep>@@
expression e1,e2;
@@

-       ib_create_ah(e1,e2)
+       rdma_create_ah(e1,e2)