Commit 4b6b6233 authored by Leon Romanovsky's avatar Leon Romanovsky
Browse files

RDMA: Use %pe format specifier for error pointers

Convert error logging throughout the RDMA subsystem to use
the %pe format specifier instead of PTR_ERR() with integer
format specifiers.

Link: https://patch.msgid.link/e81ec02df1e474be20417fb62e779776e3f47a50.1758217936.git.leon@kernel.org


Reviewed-by: default avatarZhu Yanjun <yanjun.zhu@linux.dev>
Signed-off-by: default avatarLeon Romanovsky <leonro@nvidia.com>
parent 260cce64
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -110,8 +110,7 @@ void agent_send_response(const struct ib_mad_hdr *mad_hdr, const struct ib_grh *
	agent = port_priv->agent[qpn];
	ah = ib_create_ah_from_wc(agent->qp->pd, wc, grh, port_num);
	if (IS_ERR(ah)) {
		dev_err(&device->dev, "ib_create_ah_from_wc error %ld\n",
			PTR_ERR(ah));
		dev_err(&device->dev, "ib_create_ah_from_wc error %pe\n", ah);
		return;
	}

+2 −2
Original line number Diff line number Diff line
@@ -3307,9 +3307,9 @@ int bnxt_re_resize_cq(struct ib_cq *ibcq, int cqe, struct ib_udata *udata)
				      IB_ACCESS_LOCAL_WRITE);
	if (IS_ERR(cq->resize_umem)) {
		rc = PTR_ERR(cq->resize_umem);
		ibdev_err(&rdev->ibdev, "%s: ib_umem_get failed! rc = %pe\n",
			  __func__, cq->resize_umem);
		cq->resize_umem = NULL;
		ibdev_err(&rdev->ibdev, "%s: ib_umem_get failed! rc = %d\n",
			  __func__, rc);
		goto fail;
	}
	cq->resize_cqe = entries;
+1 −2
Original line number Diff line number Diff line
@@ -1956,8 +1956,7 @@ static void bnxt_re_read_vpd_info(struct bnxt_re_dev *rdev)

	vpd_data = pci_vpd_alloc(pdev, &vpd_size);
	if (IS_ERR(vpd_data)) {
		pci_warn(pdev, "Unable to read VPD, err=%ld\n",
			 PTR_ERR(vpd_data));
		pci_warn(pdev, "Unable to read VPD, err=%pe\n", vpd_data);
		return;
	}

+2 −3
Original line number Diff line number Diff line
@@ -1228,9 +1228,8 @@ static int c4iw_uld_state_change(void *handle, enum cxgb4_state new_state)
		if (!ctx->dev) {
			ctx->dev = c4iw_alloc(&ctx->lldi);
			if (IS_ERR(ctx->dev)) {
				pr_err("%s: initialization failed: %ld\n",
				       pci_name(ctx->lldi.pdev),
				       PTR_ERR(ctx->dev));
				pr_err("%s: initialization failed: %pe\n",
				       pci_name(ctx->lldi.pdev), ctx->dev);
				ctx->dev = NULL;
				break;
			}
+2 −2
Original line number Diff line number Diff line
@@ -635,9 +635,9 @@ int efa_com_cmd_exec(struct efa_com_admin_queue *aq,
	if (IS_ERR(comp_ctx)) {
		ibdev_err_ratelimited(
			aq->efa_dev,
			"Failed to submit command %s (opcode %u) err %ld\n",
			"Failed to submit command %s (opcode %u) err %pe\n",
			efa_com_cmd_str(cmd->aq_common_descriptor.opcode),
			cmd->aq_common_descriptor.opcode, PTR_ERR(comp_ctx));
			cmd->aq_common_descriptor.opcode, comp_ctx);

		up(&aq->avail_cmds);
		atomic64_inc(&aq->stats.cmd_err);
Loading