Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp166826rdb; Thu, 24 Aug 2023 02:23:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGvR1+jEeALNHoggidXPrj6I6nQdfZQ8qfxontZgGdZh9DSDNQnC4dWp1zmEta5WfmdCnbZ X-Received: by 2002:a17:90b:909:b0:262:e6d2:2d6 with SMTP id bo9-20020a17090b090900b00262e6d202d6mr14355803pjb.47.1692868997665; Thu, 24 Aug 2023 02:23:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692868997; cv=none; d=google.com; s=arc-20160816; b=PFhdoIVAnFKVlVAWpsMJRGItqiPNmEJHEkLXbvV0bD36RTbfEsdOabkKsGRUZb43QU MKRISnOdpzMQtkOU5eoITCCw+laJAmjEEOeTP964tDFhDZ6/cHwjYLSebi45H0kU2T/U ikvAqfZhLbWGShqwVmhUDjmBFnHZAGW1Sz9EuY6VWFXqWmqy7nBscv+Lg7Ku+j7oWIWt 1pc5FlVQJjkc82aiz5yHOz6LslBcjDLG+4I+RBBE+z92CHXVLUzMl5K3ubgJ8lcV9Lbq m5Ec34q+zgz27Vj4oTHeETTMGDpo/DJFxQQ53WBXhACDeyKMS/lwrxbeDwJUEYwMlUFy u6zQ== 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=Fj+Of1/ce7wIDFbN9fDDkxcdf7pC4LDqCP4vIrMPWJg=; b=rfeCCONZx6lQOFa7oSc+AqBStkMYlpHhlvvMMw1pl9pp/4jT3KvqNRv3SusQW85wUi CK7+72cKdbFvoeOMqOEQV9GOYvr3U41Wownn/ioFwzt5adR3k2DdYA2712559PFZBv5g hEpkVS6TNN4OH9lUZdrvZdcJ2c7R3kiV40ZGmob60ddsi1Q2W/6Fm72NURUaM1ma9xPp 5vmYYVxmyy2S8Tl2Y83CyLmKvLbhJAFkKuqKtoYYx7o53md/DJrfCgAPOH6ahYdD1Jb8 QudIuVNjNolAWwdGtn3rUl+NXfaaYktGv4i/gOz3ykW1zPqIaxZyd5v0gGPt9mucnci+ ylnQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ei9-20020a17090ae54900b00263fc986e28si1543443pjb.24.2023.08.24.02.23.05; Thu, 24 Aug 2023 02:23:17 -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 S240504AbjHXHim (ORCPT + 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 ); 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 ; 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 ; 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 Cc: linux-kernel@vger.kernel.org, Philipp Zabel , David Airlie , Daniel Vetter , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , 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: X-Mailing-List: linux-kernel@vger.kernel.org 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); -- 2.42.0.rc1.204.g551eb34607-goog