summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/imx
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2024-01-10 19:39:14 +0200
committerJani Nikula <jani.nikula@intel.com>2024-01-31 11:04:25 +0200
commit03ee752f00fd0daa082b43774cfd03a7f9a17385 (patch)
tree0ca85d6f750da93aa2c6fdb1718bfd8dd2666e6e /drivers/gpu/drm/imx
parent345a36c4f1baa03275d88cd13747c6c1748b1fc0 (diff)
drm/imx: prefer snprintf over sprintf
This will trade the W=1 warning -Wformat-overflow to -Wformat-truncation. This lets us enable -Wformat-overflow subsystem wide. Cc: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/14c0108a54007a8360d84162a1d63cba9613b945.1704908087.git.jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/imx')
-rw-r--r--drivers/gpu/drm/imx/ipuv3/imx-ldb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/imx/ipuv3/imx-ldb.c b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c
index 53840ab054c7..71d70194fcbd 100644
--- a/drivers/gpu/drm/imx/ipuv3/imx-ldb.c
+++ b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c
@@ -655,7 +655,7 @@ static int imx_ldb_probe(struct platform_device *pdev)
for (i = 0; i < 4; i++) {
char clkname[16];
- sprintf(clkname, "di%d_sel", i);
+ snprintf(clkname, sizeof(clkname), "di%d_sel", i);
imx_ldb->clk_sel[i] = devm_clk_get(imx_ldb->dev, clkname);
if (IS_ERR(imx_ldb->clk_sel[i])) {
ret = PTR_ERR(imx_ldb->clk_sel[i]);