Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33718363 authored by Harvey Harrison's avatar Harvey Harrison Committed by Roland Dreier
Browse files

IB: Replace remaining __FUNCTION__ occurrences with __func__



__FUNCTION__ is gcc-specific, use __func__ instead.

Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent e8e91f6b
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ static int c2_convert_cm_status(u32 c2_status)
	default:
		printk(KERN_ERR PFX
		       "%s - Unable to convert CM status: %d\n",
		       __FUNCTION__, c2_status);
		       __func__, c2_status);
		return -EIO;
	}
}
@@ -193,7 +193,7 @@ void c2_ae_event(struct c2_dev *c2dev, u32 mq_index)
		pr_debug("%s: event = %s, user_context=%llx, "
			"resource_type=%x, "
			"resource=%x, qp_state=%s\n",
			__FUNCTION__,
			__func__,
			to_event_str(event_id),
			(unsigned long long) wr->ae.ae_generic.user_context,
			be32_to_cpu(wr->ae.ae_generic.resource_type),
@@ -259,7 +259,7 @@ void c2_ae_event(struct c2_dev *c2dev, u32 mq_index)
			BUG_ON(1);
			pr_debug("%s:%d Unexpected event_id=%d on QP=%p, "
				"CM_ID=%p\n",
				__FUNCTION__, __LINE__,
				__func__, __LINE__,
				event_id, qp, cm_id);
			break;
		}
@@ -276,7 +276,7 @@ void c2_ae_event(struct c2_dev *c2dev, u32 mq_index)
		pr_debug("C2_RES_IND_EP event_id=%d\n", event_id);
		if (event_id != CCAE_CONNECTION_REQUEST) {
			pr_debug("%s: Invalid event_id: %d\n",
				__FUNCTION__, event_id);
				__func__, event_id);
			break;
		}
		cm_event.event = IW_CM_EVENT_CONNECT_REQUEST;
+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ __be16 *c2_alloc_mqsp(struct c2_dev *c2dev, struct sp_chunk *head,
		*dma_addr = head->dma_addr +
			    ((unsigned long) &(head->shared_ptr[mqsp]) -
			     (unsigned long) head);
		pr_debug("%s addr %p dma_addr %llx\n", __FUNCTION__,
		pr_debug("%s addr %p dma_addr %llx\n", __func__,
			 &(head->shared_ptr[mqsp]), (unsigned long long) *dma_addr);
		return (__force __be16 *) &(head->shared_ptr[mqsp]);
	}
+41 −41
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ static int c2_query_device(struct ib_device *ibdev,
{
	struct c2_dev *c2dev = to_c2dev(ibdev);

	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);

	*props = c2dev->props;
	return 0;
@@ -76,7 +76,7 @@ static int c2_query_device(struct ib_device *ibdev,
static int c2_query_port(struct ib_device *ibdev,
			 u8 port, struct ib_port_attr *props)
{
	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);

	props->max_mtu = IB_MTU_4096;
	props->lid = 0;
@@ -102,14 +102,14 @@ static int c2_modify_port(struct ib_device *ibdev,
			  u8 port, int port_modify_mask,
			  struct ib_port_modify *props)
{
	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);
	return 0;
}

static int c2_query_pkey(struct ib_device *ibdev,
			 u8 port, u16 index, u16 * pkey)
{
	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);
	*pkey = 0;
	return 0;
}
@@ -119,7 +119,7 @@ static int c2_query_gid(struct ib_device *ibdev, u8 port,
{
	struct c2_dev *c2dev = to_c2dev(ibdev);

	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);
	memset(&(gid->raw[0]), 0, sizeof(gid->raw));
	memcpy(&(gid->raw[0]), c2dev->pseudo_netdev->dev_addr, 6);

@@ -134,7 +134,7 @@ static struct ib_ucontext *c2_alloc_ucontext(struct ib_device *ibdev,
{
	struct c2_ucontext *context;

	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);
	context = kmalloc(sizeof(*context), GFP_KERNEL);
	if (!context)
		return ERR_PTR(-ENOMEM);
@@ -144,14 +144,14 @@ static struct ib_ucontext *c2_alloc_ucontext(struct ib_device *ibdev,

static int c2_dealloc_ucontext(struct ib_ucontext *context)
{
	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);
	kfree(context);
	return 0;
}

static int c2_mmap_uar(struct ib_ucontext *context, struct vm_area_struct *vma)
{
	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);
	return -ENOSYS;
}

@@ -162,7 +162,7 @@ static struct ib_pd *c2_alloc_pd(struct ib_device *ibdev,
	struct c2_pd *pd;
	int err;

	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);

	pd = kmalloc(sizeof(*pd), GFP_KERNEL);
	if (!pd)
@@ -187,7 +187,7 @@ static struct ib_pd *c2_alloc_pd(struct ib_device *ibdev,

static int c2_dealloc_pd(struct ib_pd *pd)
{
	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);
	c2_pd_free(to_c2dev(pd->device), to_c2pd(pd));
	kfree(pd);

@@ -196,13 +196,13 @@ static int c2_dealloc_pd(struct ib_pd *pd)

static struct ib_ah *c2_ah_create(struct ib_pd *pd, struct ib_ah_attr *ah_attr)
{
	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);
	return ERR_PTR(-ENOSYS);
}

static int c2_ah_destroy(struct ib_ah *ah)
{
	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);
	return -ENOSYS;
}

@@ -230,7 +230,7 @@ struct ib_qp *c2_get_qp(struct ib_device *device, int qpn)

	qp = c2_find_qpn(c2dev, qpn);
	pr_debug("%s Returning QP=%p for QPN=%d, device=%p, refcount=%d\n",
		__FUNCTION__, qp, qpn, device,
		__func__, qp, qpn, device,
		(qp?atomic_read(&qp->refcount):0));

	return (qp?&qp->ibqp:NULL);
@@ -243,13 +243,13 @@ static struct ib_qp *c2_create_qp(struct ib_pd *pd,
	struct c2_qp *qp;
	int err;

	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);

	switch (init_attr->qp_type) {
	case IB_QPT_RC:
		qp = kzalloc(sizeof(*qp), GFP_KERNEL);
		if (!qp) {
			pr_debug("%s: Unable to allocate QP\n", __FUNCTION__);
			pr_debug("%s: Unable to allocate QP\n", __func__);
			return ERR_PTR(-ENOMEM);
		}
		spin_lock_init(&qp->lock);
@@ -266,7 +266,7 @@ static struct ib_qp *c2_create_qp(struct ib_pd *pd,

		break;
	default:
		pr_debug("%s: Invalid QP type: %d\n", __FUNCTION__,
		pr_debug("%s: Invalid QP type: %d\n", __func__,
			init_attr->qp_type);
		return ERR_PTR(-EINVAL);
		break;
@@ -285,7 +285,7 @@ static int c2_destroy_qp(struct ib_qp *ib_qp)
	struct c2_qp *qp = to_c2qp(ib_qp);

	pr_debug("%s:%u qp=%p,qp->state=%d\n",
		__FUNCTION__, __LINE__,ib_qp,qp->state);
		__func__, __LINE__, ib_qp, qp->state);
	c2_free_qp(to_c2dev(ib_qp->device), qp);
	kfree(qp);
	return 0;
@@ -300,13 +300,13 @@ static struct ib_cq *c2_create_cq(struct ib_device *ibdev, int entries, int vect

	cq = kmalloc(sizeof(*cq), GFP_KERNEL);
	if (!cq) {
		pr_debug("%s: Unable to allocate CQ\n", __FUNCTION__);
		pr_debug("%s: Unable to allocate CQ\n", __func__);
		return ERR_PTR(-ENOMEM);
	}

	err = c2_init_cq(to_c2dev(ibdev), entries, NULL, cq);
	if (err) {
		pr_debug("%s: error initializing CQ\n", __FUNCTION__);
		pr_debug("%s: error initializing CQ\n", __func__);
		kfree(cq);
		return ERR_PTR(err);
	}
@@ -318,7 +318,7 @@ static int c2_destroy_cq(struct ib_cq *ib_cq)
{
	struct c2_cq *cq = to_c2cq(ib_cq);

	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);

	c2_free_cq(to_c2dev(ib_cq->device), cq);
	kfree(cq);
@@ -400,7 +400,7 @@ static struct ib_mr *c2_reg_phys_mr(struct ib_pd *ib_pd,
	mr->umem = NULL;
	pr_debug("%s - page shift %d, pbl_depth %d, total_len %u, "
		"*iova_start %llx, first pa %llx, last pa %llx\n",
		__FUNCTION__, page_shift, pbl_depth, total_len,
		__func__, page_shift, pbl_depth, total_len,
		(unsigned long long) *iova_start,
	       	(unsigned long long) page_list[0],
	       	(unsigned long long) page_list[pbl_depth-1]);
@@ -422,7 +422,7 @@ static struct ib_mr *c2_get_dma_mr(struct ib_pd *pd, int acc)
	struct ib_phys_buf bl;
	u64 kva = 0;

	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);

	/* AMSO1100 limit */
	bl.size = 0xffffffff;
@@ -442,7 +442,7 @@ static struct ib_mr *c2_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
	struct c2_pd *c2pd = to_c2pd(pd);
	struct c2_mr *c2mr;

	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);

	c2mr = kmalloc(sizeof(*c2mr), GFP_KERNEL);
	if (!c2mr)
@@ -506,7 +506,7 @@ static int c2_dereg_mr(struct ib_mr *ib_mr)
	struct c2_mr *mr = to_c2mr(ib_mr);
	int err;

	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);

	err = c2_stag_dealloc(to_c2dev(ib_mr->device), ib_mr->lkey);
	if (err)
@@ -523,14 +523,14 @@ static int c2_dereg_mr(struct ib_mr *ib_mr)
static ssize_t show_rev(struct class_device *cdev, char *buf)
{
	struct c2_dev *dev = container_of(cdev, struct c2_dev, ibdev.class_dev);
	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);
	return sprintf(buf, "%x\n", dev->props.hw_ver);
}

static ssize_t show_fw_ver(struct class_device *cdev, char *buf)
{
	struct c2_dev *dev = container_of(cdev, struct c2_dev, ibdev.class_dev);
	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);
	return sprintf(buf, "%x.%x.%x\n",
		       (int) (dev->props.fw_ver >> 32),
		       (int) (dev->props.fw_ver >> 16) & 0xffff,
@@ -539,13 +539,13 @@ static ssize_t show_fw_ver(struct class_device *cdev, char *buf)

static ssize_t show_hca(struct class_device *cdev, char *buf)
{
	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);
	return sprintf(buf, "AMSO1100\n");
}

static ssize_t show_board(struct class_device *cdev, char *buf)
{
	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);
	return sprintf(buf, "%.*s\n", 32, "AMSO1100 Board ID");
}

@@ -575,13 +575,13 @@ static int c2_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,

static int c2_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
{
	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);
	return -ENOSYS;
}

static int c2_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
{
	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);
	return -ENOSYS;
}

@@ -592,13 +592,13 @@ static int c2_process_mad(struct ib_device *ibdev,
			  struct ib_grh *in_grh,
			  struct ib_mad *in_mad, struct ib_mad *out_mad)
{
	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);
	return -ENOSYS;
}

static int c2_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *iw_param)
{
	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);

	/* Request a connection */
	return c2_llp_connect(cm_id, iw_param);
@@ -606,7 +606,7 @@ static int c2_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *iw_param)

static int c2_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *iw_param)
{
	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);

	/* Accept the new connection */
	return c2_llp_accept(cm_id, iw_param);
@@ -616,7 +616,7 @@ static int c2_reject(struct iw_cm_id *cm_id, const void *pdata, u8 pdata_len)
{
	int err;

	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);

	err = c2_llp_reject(cm_id, pdata, pdata_len);
	return err;
@@ -626,10 +626,10 @@ static int c2_service_create(struct iw_cm_id *cm_id, int backlog)
{
	int err;

	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);
	err = c2_llp_service_create(cm_id, backlog);
	pr_debug("%s:%u err=%d\n",
		__FUNCTION__, __LINE__,
		__func__, __LINE__,
		err);
	return err;
}
@@ -637,7 +637,7 @@ static int c2_service_create(struct iw_cm_id *cm_id, int backlog)
static int c2_service_destroy(struct iw_cm_id *cm_id)
{
	int err;
	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);

	err = c2_llp_service_destroy(cm_id);

@@ -743,7 +743,7 @@ static struct net_device *c2_pseudo_netdev_init(struct c2_dev *c2dev)
	netdev = alloc_netdev(sizeof(*netdev), name, setup);
	if (!netdev) {
		printk(KERN_ERR PFX "%s -  etherdev alloc failed",
			__FUNCTION__);
			__func__);
		return NULL;
	}

@@ -780,7 +780,7 @@ int c2_register_device(struct c2_dev *dev)
	if (ret)
		goto out2;

	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);
	strlcpy(dev->ibdev.name, "amso%d", IB_DEVICE_NAME_MAX);
	dev->ibdev.owner = THIS_MODULE;
	dev->ibdev.uverbs_cmd_mask =
@@ -873,13 +873,13 @@ out1:
out2:
	free_netdev(dev->pseudo_netdev);
out3:
	pr_debug("%s:%u ret=%d\n", __FUNCTION__, __LINE__, ret);
	pr_debug("%s:%u ret=%d\n", __func__, __LINE__, ret);
	return ret;
}

void c2_unregister_device(struct c2_dev *dev)
{
	pr_debug("%s:%u\n", __FUNCTION__, __LINE__);
	pr_debug("%s:%u\n", __func__, __LINE__);
	unregister_netdev(dev->pseudo_netdev);
	free_netdev(dev->pseudo_netdev);
	ib_unregister_device(&dev->ibdev);
+4 −4
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ void c2_set_qp_state(struct c2_qp *qp, int c2_state)
	int new_state = to_ib_state(c2_state);

	pr_debug("%s: qp[%p] state modify %s --> %s\n",
	       __FUNCTION__,
	       __func__,
		qp,
		to_ib_state_str(qp->state),
		to_ib_state_str(new_state));
@@ -141,7 +141,7 @@ int c2_qp_modify(struct c2_dev *c2dev, struct c2_qp *qp,
	int err;

	pr_debug("%s:%d qp=%p, %s --> %s\n",
		__FUNCTION__, __LINE__,
		__func__, __LINE__,
		qp,
		to_ib_state_str(qp->state),
		to_ib_state_str(attr->qp_state));
@@ -224,7 +224,7 @@ int c2_qp_modify(struct c2_dev *c2dev, struct c2_qp *qp,
		qp->state = next_state;
#ifdef DEBUG
	else
		pr_debug("%s: c2_errno=%d\n", __FUNCTION__, err);
		pr_debug("%s: c2_errno=%d\n", __func__, err);
#endif
	/*
	 * If we're going to error and generating the event here, then
@@ -243,7 +243,7 @@ int c2_qp_modify(struct c2_dev *c2dev, struct c2_qp *qp,
	vq_req_free(c2dev, vq_req);

	pr_debug("%s:%d qp=%p, cur_state=%s\n",
		__FUNCTION__, __LINE__,
		__func__, __LINE__,
		qp,
		to_ib_state_str(qp->state));
	return err;
+2 −2
Original line number Diff line number Diff line
@@ -524,7 +524,7 @@ int __devinit c2_rnic_init(struct c2_dev *c2dev)
		goto bail1;
	}
	pci_unmap_addr_set(&c2dev->rep_vq, mapping, c2dev->rep_vq.host_dma);
	pr_debug("%s rep_vq va %p dma %llx\n", __FUNCTION__, q1_pages,
	pr_debug("%s rep_vq va %p dma %llx\n", __func__, q1_pages,
		 (unsigned long long) c2dev->rep_vq.host_dma);
	c2_mq_rep_init(&c2dev->rep_vq,
		   1,
@@ -545,7 +545,7 @@ int __devinit c2_rnic_init(struct c2_dev *c2dev)
		goto bail2;
	}
	pci_unmap_addr_set(&c2dev->aeq, mapping, c2dev->aeq.host_dma);
	pr_debug("%s aeq va %p dma %llx\n", __FUNCTION__, q2_pages,
	pr_debug("%s aeq va %p dma %llx\n", __func__, q2_pages,
		 (unsigned long long) c2dev->aeq.host_dma);
	c2_mq_rep_init(&c2dev->aeq,
		       2,
Loading