On Mon, Dec 16, 2024 at 09:33:13AM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@xxxxxxxx> > > 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@xxxxxxxx> > --- > I have a larger series that I still plan to send eventually, sending this > one now as I just saw another one get added. The warning is enabled by > default because there are still over 100 other files with the same problem. > --- > drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 2 +- > drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 28 ++++++++++++++++--------- > 2 files changed, 19 insertions(+), 11 deletions(-) Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx> -- With best wishes Dmitry