From patchwork Thu Aug 24 07:36:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 13363643 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E38A1C7EE2C for ; Thu, 24 Aug 2023 07:38:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6035110E4AC; Thu, 24 Aug 2023 07:38:09 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id DF82F10E496 for ; Thu, 24 Aug 2023 07:38:06 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6080662349; Thu, 24 Aug 2023 07:38:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F4046C433C7; Thu, 24 Aug 2023 07:38:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692862685; bh=Dk8iyOyFggoB4EAzE/YjAU2+gPq8/lElJKWAaFnOoqA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vFMzcDocYu5qJE0nqzVZdFuYHkgjWFhcb+ESDiqEszUjE9SMw3zgXQukSHH1cxzzD R7fOHxw628wRKYtkeWd4BpUiY+hOMkJjFgm4pXVW9Odzu8qLYXPOmByNyGVvRIDy1s 5JCNl8iVNNE2gKRU5wFOI5Zy60P05USK3PMSWYAPgs6xNvi2FtuCJHmMe3dhpwIV5x GbnayJBlAWUHp8AOfJXapQJwWtCZbG8sNT9goXD2FZ3Np1FpknuDs/BWi6DoaE9+qx 3sjSKiYBYrqJz/NBRIYkvNeHXdo9A6niRzQfJIjzA7XmK4nNKHbDlMGwMSXQECZK/J E0NwxFh8smr0A== From: Lee Jones To: lee@kernel.org Subject: [PATCH 14/20] drm/imx/ipuv3/imx-ldb: Increase buffer size to ensure all possible values can be stored Date: Thu, 24 Aug 2023 08:36:59 +0100 Message-ID: <20230824073710.2677348-15-lee@kernel.org> X-Mailer: git-send-email 2.42.0.rc1.204.g551eb34607-goog In-Reply-To: <20230824073710.2677348-1-lee@kernel.org> References: <20230824073710.2677348-1-lee@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sascha Hauer , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, NXP Linux Team , Shawn Guo , Pengutronix Kernel Team , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" When converting from int to string, we must allow for up to 10-chars (2147483647). Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/imx/ipuv3/imx-ldb.c: In function ‘imx_ldb_probe’: drivers/gpu/drm/imx/ipuv3/imx-ldb.c:659:39: warning: ‘_sel’ directive writing 4 bytes into a region of size between 3 and 13 [-Wformat-overflow=] drivers/gpu/drm/imx/ipuv3/imx-ldb.c:659:17: note: ‘sprintf’ output between 8 and 18 bytes into a destination of size 16 Signed-off-by: Lee Jones --- Cc: Philipp Zabel Cc: David Airlie Cc: Daniel Vetter Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org --- drivers/gpu/drm/imx/ipuv3/imx-ldb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/imx/ipuv3/imx-ldb.c b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c index c45fc8f4744d0..0404781dcd176 100644 --- a/drivers/gpu/drm/imx/ipuv3/imx-ldb.c +++ b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c @@ -654,7 +654,7 @@ static int imx_ldb_probe(struct platform_device *pdev) * Map them all to di0_sel...di3_sel. */ for (i = 0; i < 4; i++) { - char clkname[16]; + char clkname[18]; sprintf(clkname, "di%d_sel", i); imx_ldb->clk_sel[i] = devm_clk_get(imx_ldb->dev, clkname);