]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/msm: fix -Wformat-security warnings
authorArnd Bergmann <arnd@arndb.de>
Mon, 16 Dec 2024 08:33:13 +0000 (09:33 +0100)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tue, 24 Dec 2024 18:57:59 +0000 (20:57 +0200)
commit49c2e01be19cd1159c2a49da1733e98f5be3da0a
tree12e9de58bf118140fa167611bd3241f834bfc609
parent3a7a4bebe0dbe22686da7de573f183e0c842883a
drm/msm: fix -Wformat-security warnings

Passing a variable string as a printf style format is potentially
dangerous that -Wformat-security can warn about if enabled. A new
instance just got added:

drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c: In function 'dpu_kms_mdp_snapshot':
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:1046:49: error: format not a string literal and no format arguments [-Werror=format-security]
 1046 |                                             vbif->name);
      |                                             ~~~~^~~~~~

Fix this one and the preexisting -Wformat-security warnings the in the
DRM code for snapdragon.

Fixes: 1a40bb31fcf1 ("drm/msm/dpu: Add VBIF to DPU snapshot") # and others
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/629126/
Link: https://lore.kernel.org/r/20241216083319.1838449-1-arnd@kernel.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/msm/adreno/a6xx_gmu.c
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c