[14/20] drm/imx/ipuv3/imx-ldb: Increase buffer size to ensure all possible values can be stored
Message ID | 20230824073710.2677348-15-lee@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a7d1:0:b0:3f2:4152:657d with SMTP id p17csp1045764vqm; Thu, 24 Aug 2023 04:21:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHf6aJhHVE6CrH/PlJuxGTf3H2tFBdVBjLUW99krpNrr2vFaESVS6jfPyqOvus9jGOJ4FfM X-Received: by 2002:a17:907:2e01:b0:9a1:9589:b513 with SMTP id ig1-20020a1709072e0100b009a19589b513mr9343539ejc.8.1692876092504; Thu, 24 Aug 2023 04:21:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692876092; cv=none; d=google.com; s=arc-20160816; b=fzSOz7BuqrNPu8r48RgI49cJeLwucQI/Kl9aiwLeHsE3nkxFFN/2CbAzpMS8m6n33G 1QrJazUN+VcHW/L9ej7MH0QqO/PIhM98JaWaszVTB//Zff9TT7SwE0uafPqDYCjlriSj sOiJTa35ynOeSXrM+AK1MNUDxrVZLj6xYZOZGsDOdE8v2lrSsZVZdVAiVGeXuOsRIxM/ qg2LoV21lpSHuKFRW09POndxMuUPXlEb3940+4Bx9d13qx3DnSMmC9P3Qi7evW3fmX8B 9OqdstXGFXvJ7j8R0FUJHogRYFXnzrlvGEs6ztbWcVqj7y5hluZI14+MDXBOxgoGIyuT plaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5npZHyzFSin94t35efMdrWwnhkBBzttBLiOlpp4QKZA=; fh=ln4oBu6tlY6/t3tFsy/iQTr1JZylFsZRKx5pjfnnYPA=; b=BCgjiDxrcdRRzgLgACNeWMl18pQwJ/hbH0wuyGI3rJgVD/PUORLiIBOBUrshsfg6Qf myTN7tz0BXuKyHkYFzcnNCQ2JnAT3j3NDgT0a0BRQSxgeaq8I6O3zl7wGazVQcyDf65+ 3WW9qBXkYKH7/V9pT+c4S9KNOeBDlU0/0u5dOCCcNhsH8AofXuTKgn62nOJjn6oCIX3Y E5ewEbPT84rVa8zAb3z/BunBO35HTrwPY/d/fiO6ojepS3gYc87+zKqX5V9okmd7F1hk wiU6DItF2c9WOGhl0oUA1vN0rBNMQU76t4JB01i93Ld9Sc/fDppDVjGl1D4yaW+RIy/7 ef1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vFMzcDoc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n15-20020a170906164f00b0098e47bbff3csi10455250ejd.297.2023.08.24.04.21.07; Thu, 24 Aug 2023 04:21:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vFMzcDoc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240505AbjHXHim (ORCPT <rfc822;kjyul0303@gmail.com> + 99 others); Thu, 24 Aug 2023 03:38:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232045AbjHXHiI (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 24 Aug 2023 03:38:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA47DC7 for <linux-kernel@vger.kernel.org>; Thu, 24 Aug 2023 00:38:06 -0700 (PDT) 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 58A1565CD5 for <linux-kernel@vger.kernel.org>; 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 <lee@kernel.org> To: lee@kernel.org Cc: linux-kernel@vger.kernel.org, Philipp Zabel <p.zabel@pengutronix.de>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, NXP Linux Team <linux-imx@nxp.com>, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1775109241778999484 X-GMAIL-MSGID: 1775109241778999484 |
Series |
Rid W=1 warnings from GPU
|
|
Commit Message
Lee Jones
Aug. 24, 2023, 7:36 a.m. UTC
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 <lee@kernel.org>
---
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
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);