Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp166828rdb; Thu, 24 Aug 2023 02:23:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFNM5gOxMkImuH6jQP0btyk2GkRy/DfJuB2ZtgE0XOe0a3R4T8jpG1r8idxqPMDgTbiJQmw X-Received: by 2002:a05:6a00:1da0:b0:68a:6d34:474b with SMTP id z32-20020a056a001da000b0068a6d34474bmr10366166pfw.15.1692868997838; 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=zBg5M/XMqysQHKAfXUeDpruUNJcrjuvLBYRMXpQ142KAuos04tpoEFJe1EagFcauGK It/0CcLlEtzIR2hJRQ5mT4gDl78YupkBq5kwOrPIWCkG8/q0mpeO/x6SfRKAZwYzmlsJ aVmESkDlz0KskAjmFFTpBKjnol4t5COlOBj89amemOcpq8d8bDEyFvf8r76X8pKCfS+s FtSGruI13FVW677k2TXT1RxTWs5fR9TYkgF8Ioj5g8QNeeq8NoJHgsSHPKzsTLm8RrVn WGCIUvPKWo1kRwQrrbxlSVdhPofcAv9SmmNX/62IjywFEmRkvsNuJuN2Y4kLOWBy9l1D QRvw== 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=IlNynGSeOURPgIJCdxsLsJadJO5xK20ZGYnG1Vkj3oo=; fh=NO3tluWefgkjWetjZfvHxYh4xbs+LWa8Tdgdi23eFzY=; b=CQbk2kFBiDxzxoW3PaswmXfUnVXNT3TSQxpLSejhAJFJQ0GlUVCUb59kf+EmMP/hxN vxu01RbAmKag0V8iVqKwoUqGvunWE+aFzOfaCQa5/aXioa6CNXAHKpBqZFPUV+ctppWF WzS+eBWsYfc7wdzhY8xnLb8Nn26LXqKQIY1bNxQkMnOwcfzaDvU+oDNzk/djtA67HSKH eVwjZmsHoLH6EZ8/fqruXlITjotdeFpZP+IO1CR6WV+/BOnDFwd0UMhSwK7HLsnDPtfP BJ1bl5u4MKZGQ7zpjDjQKNAlU9azsXwC3QDNsVHPpRRJJn/9um/bFNQdnHpSkjwn5tsd aIXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=u5ji2+9D; 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 z26-20020a637e1a000000b0056c4189d6d9si3566842pgc.836.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=u5ji2+9D; 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 S240510AbjHXHio (ORCPT + 99 others); Thu, 24 Aug 2023 03:38:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240417AbjHXHiL (ORCPT ); Thu, 24 Aug 2023 03:38:11 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65DACC7; Thu, 24 Aug 2023 00:38:09 -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 04EEE65936; Thu, 24 Aug 2023 07:38:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42B0BC433CA; Thu, 24 Aug 2023 07:38:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692862688; bh=Ud+JmrQSf+WR8fLk9PtmUGKmnz/n+mzcTHuAf4DcxX4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u5ji2+9DHanRfav04RicE1BpnqasiNzCcJCY2gklfVBpwKZTDHXBnfRI2zPvHMR6b EDhSsPp9uIbNp0XLq4wmsg5rQl1GVmwm+KGFyMv7ED3vMGkja+GQKQmvoOWTmaLiTf rkQwt73vqm4LSSOyqNdGHff79+P77BUQiGk54ItBMwFHwusnjsamjymWUp3I/tY8R8 pyqQhtTglLhNR1viLM6VVH7wuZSev3eBVvkF+7srRuni8wsseL4fMmlmlctOySpWdF Rzd7UzjZBnBztEE+Lr0XPWru9W5onfLE0NSPSduzJHZKqV5keWJTCIk2d0BcJNKQe1 hhXLhGInGs3SA== From: Lee Jones To: lee@kernel.org Cc: linux-kernel@vger.kernel.org, Thierry Reding , Mikko Perttunen , David Airlie , Daniel Vetter , Jonathan Hunter , Philipp Zabel , dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org Subject: [PATCH 15/20] drm/tegra/hub: Increase buffer size to ensure all possible values can be stored Date: Thu, 24 Aug 2023 08:37:00 +0100 Message-ID: <20230824073710.2677348-16-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/tegra/hub.c: In function ‘tegra_display_hub_probe’: drivers/gpu/drm/tegra/hub.c:1106:47: warning: ‘%u’ directive output may be truncated writing between 1 and 10 bytes into a region of size 4 [-Wformat-truncation=] drivers/gpu/drm/tegra/hub.c:1106:42: note: directive argument in the range [0, 4294967294] drivers/gpu/drm/tegra/hub.c:1106:17: note: ‘snprintf’ output between 6 and 15 bytes into a destination of size 8 Signed-off-by: Lee Jones --- Cc: Thierry Reding Cc: Mikko Perttunen Cc: David Airlie Cc: Daniel Vetter Cc: Jonathan Hunter Cc: Philipp Zabel Cc: dri-devel@lists.freedesktop.org Cc: linux-tegra@vger.kernel.org --- drivers/gpu/drm/tegra/hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tegra/hub.c b/drivers/gpu/drm/tegra/hub.c index 1af5f8318d914..f21e57e8599ee 100644 --- a/drivers/gpu/drm/tegra/hub.c +++ b/drivers/gpu/drm/tegra/hub.c @@ -1101,7 +1101,7 @@ static int tegra_display_hub_probe(struct platform_device *pdev) for (i = 0; i < hub->soc->num_wgrps; i++) { struct tegra_windowgroup *wgrp = &hub->wgrps[i]; - char id[8]; + char id[16]; snprintf(id, sizeof(id), "wgrp%u", i); mutex_init(&wgrp->lock); -- 2.42.0.rc1.204.g551eb34607-goog