Commit a9fb3287 authored by Bob Pearson's avatar Bob Pearson Committed by Jason Gunthorpe
Browse files

RDMA/rxe: Change rxe_dbg to rxe_dbg_dev

Replace the name rxe_dbg with rxe_dbg_dev which better matches
the remaining rxe_dbg_xxx macros for debug messages with a
rxe device parameter. Reuse the name rxe_dbg for debug messages
which do not have a rxe device parameter.

Link: https://lore.kernel.org/r/20230303221623.8053-3-rpearsonhpe@gmail.com


Signed-off-by: default avatarBob Pearson <rpearsonhpe@gmail.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent 9168d125
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -187,7 +187,7 @@ static int rxe_newlink(const char *ibdev_name, struct net_device *ndev)
	rxe = rxe_get_dev_from_net(ndev);
	if (rxe) {
		ib_device_put(&rxe->ib_dev);
		rxe_dbg(rxe, "already configured on %s\n", ndev->name);
		rxe_dbg_dev(rxe, "already configured on %s\n", ndev->name);
		err = -EEXIST;
		goto err;
	}
+2 −1
Original line number Diff line number Diff line
@@ -38,7 +38,8 @@

#define RXE_ROCE_V2_SPORT		(0xc000)

#define rxe_dbg(rxe, fmt, ...) ibdev_dbg(&(rxe)->ib_dev,		\
#define rxe_dbg(fmt, ...) pr_debug("%s: " fmt "\n", __func__, ##__VA_ARGS__)
#define rxe_dbg_dev(rxe, fmt, ...) ibdev_dbg(&(rxe)->ib_dev,		\
		"%s: " fmt, __func__, ##__VA_ARGS__)
#define rxe_dbg_uc(uc, fmt, ...) ibdev_dbg((uc)->ibuc.device,		\
		"uc#%d %s: " fmt, (uc)->elem.index, __func__, ##__VA_ARGS__)
+3 −3
Original line number Diff line number Diff line
@@ -14,12 +14,12 @@ int rxe_cq_chk_attr(struct rxe_dev *rxe, struct rxe_cq *cq,
	int count;

	if (cqe <= 0) {
		rxe_dbg(rxe, "cqe(%d) <= 0\n", cqe);
		rxe_dbg_dev(rxe, "cqe(%d) <= 0\n", cqe);
		goto err1;
	}

	if (cqe > rxe->attr.max_cqe) {
		rxe_dbg(rxe, "cqe(%d) > max_cqe(%d)\n",
		rxe_dbg_dev(rxe, "cqe(%d) > max_cqe(%d)\n",
				cqe, rxe->attr.max_cqe);
		goto err1;
	}
@@ -65,7 +65,7 @@ int rxe_cq_from_init(struct rxe_dev *rxe, struct rxe_cq *cq, int cqe,
	cq->queue = rxe_queue_init(rxe, &cqe,
			sizeof(struct rxe_cqe), type);
	if (!cq->queue) {
		rxe_dbg(rxe, "unable to create cq\n");
		rxe_dbg_dev(rxe, "unable to create cq\n");
		return -ENOMEM;
	}

+2 −2
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ int rxe_icrc_init(struct rxe_dev *rxe)

	tfm = crypto_alloc_shash("crc32", 0, 0);
	if (IS_ERR(tfm)) {
		rxe_dbg(rxe, "failed to init crc32 algorithm err: %ld\n",
		rxe_dbg_dev(rxe, "failed to init crc32 algorithm err: %ld\n",
			       PTR_ERR(tfm));
		return PTR_ERR(tfm);
	}
@@ -51,7 +51,7 @@ static __be32 rxe_crc32(struct rxe_dev *rxe, __be32 crc, void *next, size_t len)
	*(__be32 *)shash_desc_ctx(shash) = crc;
	err = crypto_shash_update(shash, next, len);
	if (unlikely(err)) {
		rxe_dbg(rxe, "failed crc calculation, err: %d\n", err);
		rxe_dbg_dev(rxe, "failed crc calculation, err: %d\n", err);
		return (__force __be32)crc32_le((__force u32)crc, next, len);
	}

+3 −3
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ int rxe_mmap(struct ib_ucontext *context, struct vm_area_struct *vma)

		/* Don't allow a mmap larger than the object. */
		if (size > ip->info.size) {
			rxe_dbg(rxe, "mmap region is larger than the object!\n");
			rxe_dbg_dev(rxe, "mmap region is larger than the object!\n");
			spin_unlock_bh(&rxe->pending_lock);
			ret = -EINVAL;
			goto done;
@@ -87,7 +87,7 @@ int rxe_mmap(struct ib_ucontext *context, struct vm_area_struct *vma)

		goto found_it;
	}
	rxe_dbg(rxe, "unable to find pending mmap info\n");
	rxe_dbg_dev(rxe, "unable to find pending mmap info\n");
	spin_unlock_bh(&rxe->pending_lock);
	ret = -EINVAL;
	goto done;
@@ -98,7 +98,7 @@ int rxe_mmap(struct ib_ucontext *context, struct vm_area_struct *vma)

	ret = remap_vmalloc_range(vma, ip->obj, 0);
	if (ret) {
		rxe_dbg(rxe, "err %d from remap_vmalloc_range\n", ret);
		rxe_dbg_dev(rxe, "err %d from remap_vmalloc_range\n", ret);
		goto done;
	}

Loading