Skip to content

Commit 1ba9fbe

Browse files
t-8chRob Clark
authored andcommitted
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 ad67b74 ("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: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/667895/ Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
1 parent 0b6974b commit 1ba9fbe

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ static void _dpu_crtc_complete_flip(struct drm_crtc *crtc)
596596

597597
spin_lock_irqsave(&dev->event_lock, flags);
598598
if (dpu_crtc->event) {
599-
DRM_DEBUG_VBL("%s: send event: %pK\n", dpu_crtc->name,
599+
DRM_DEBUG_VBL("%s: send event: %p\n", dpu_crtc->name,
600600
dpu_crtc->event);
601601
trace_dpu_crtc_complete_flip(DRMID(crtc));
602602
drm_crtc_send_vblank_event(crtc, dpu_crtc->event);

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ static void dpu_setup_dspp_pcc(struct dpu_hw_dspp *ctx,
3131
u32 base;
3232

3333
if (!ctx) {
34-
DRM_ERROR("invalid ctx %pK\n", ctx);
34+
DRM_ERROR("invalid ctx %p\n", ctx);
3535
return;
3636
}
3737

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

4040
if (!base) {
41-
DRM_ERROR("invalid ctx %pK pcc base 0x%x\n", ctx, base);
41+
DRM_ERROR("invalid ctx %p pcc base 0x%x\n", ctx, base);
4242
return;
4343
}
4444

drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,7 +1345,7 @@ static int dpu_kms_mmap_mdp5(struct dpu_kms *dpu_kms)
13451345
dpu_kms->mmio = NULL;
13461346
return ret;
13471347
}
1348-
DRM_DEBUG("mapped dpu address space @%pK\n", dpu_kms->mmio);
1348+
DRM_DEBUG("mapped dpu address space @%p\n", dpu_kms->mmio);
13491349

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

13851385
dpu_kms->vbif[VBIF_RT] = msm_ioremap(pdev, "vbif");
13861386
if (IS_ERR(dpu_kms->vbif[VBIF_RT])) {

drivers/gpu/drm/msm/msm_mdss.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ static struct msm_mdss *msm_mdss_init(struct platform_device *pdev, bool is_mdp5
423423
if (IS_ERR(msm_mdss->mmio))
424424
return ERR_CAST(msm_mdss->mmio);
425425

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

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

0 commit comments

Comments
 (0)