Commit 1ba9fbe4 authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Rob Clark
Browse files

drm/msm: Don't use %pK through printk



In the past %pK was preferable to %p as it would not leak raw pointer
values into the kernel log.
Since commit ad67b74d ("printk: hash addresses printed with %p")
the regular %p has been improved to avoid this issue.
Furthermore, restricted pointers ("%pK") were never meant to be used
through printk(). They can still unintentionally leak raw pointers or
acquire sleeping locks in atomic contexts.

Switch to the regular pointer formatting which is safer and
easier to reason about.

Signed-off-by: default avatarThomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/667895/


Signed-off-by: default avatarRob Clark <robin.clark@oss.qualcomm.com>
parent 0b6974bb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -596,7 +596,7 @@ static void _dpu_crtc_complete_flip(struct drm_crtc *crtc)

	spin_lock_irqsave(&dev->event_lock, flags);
	if (dpu_crtc->event) {
		DRM_DEBUG_VBL("%s: send event: %pK\n", dpu_crtc->name,
		DRM_DEBUG_VBL("%s: send event: %p\n", dpu_crtc->name,
			      dpu_crtc->event);
		trace_dpu_crtc_complete_flip(DRMID(crtc));
		drm_crtc_send_vblank_event(crtc, dpu_crtc->event);
+2 −2
Original line number Diff line number Diff line
@@ -31,14 +31,14 @@ static void dpu_setup_dspp_pcc(struct dpu_hw_dspp *ctx,
	u32 base;

	if (!ctx) {
		DRM_ERROR("invalid ctx %pK\n", ctx);
		DRM_ERROR("invalid ctx %p\n", ctx);
		return;
	}

	base = ctx->cap->sblk->pcc.base;

	if (!base) {
		DRM_ERROR("invalid ctx %pK pcc base 0x%x\n", ctx, base);
		DRM_ERROR("invalid ctx %p pcc base 0x%x\n", ctx, base);
		return;
	}

+2 −2
Original line number Diff line number Diff line
@@ -1345,7 +1345,7 @@ static int dpu_kms_mmap_mdp5(struct dpu_kms *dpu_kms)
		dpu_kms->mmio = NULL;
		return ret;
	}
	DRM_DEBUG("mapped dpu address space @%pK\n", dpu_kms->mmio);
	DRM_DEBUG("mapped dpu address space @%p\n", dpu_kms->mmio);

	dpu_kms->vbif[VBIF_RT] = msm_ioremap_mdss(mdss_dev,
						  dpu_kms->pdev,
@@ -1380,7 +1380,7 @@ static int dpu_kms_mmap_dpu(struct dpu_kms *dpu_kms)
		dpu_kms->mmio = NULL;
		return ret;
	}
	DRM_DEBUG("mapped dpu address space @%pK\n", dpu_kms->mmio);
	DRM_DEBUG("mapped dpu address space @%p\n", dpu_kms->mmio);

	dpu_kms->vbif[VBIF_RT] = msm_ioremap(pdev, "vbif");
	if (IS_ERR(dpu_kms->vbif[VBIF_RT])) {
+1 −1
Original line number Diff line number Diff line
@@ -423,7 +423,7 @@ static struct msm_mdss *msm_mdss_init(struct platform_device *pdev, bool is_mdp5
	if (IS_ERR(msm_mdss->mmio))
		return ERR_CAST(msm_mdss->mmio);

	dev_dbg(&pdev->dev, "mapped mdss address space @%pK\n", msm_mdss->mmio);
	dev_dbg(&pdev->dev, "mapped mdss address space @%p\n", msm_mdss->mmio);

	ret = msm_mdss_parse_data_bus_icc_path(&pdev->dev, msm_mdss);
	if (ret)