From nobody Fri Sep 20 18:40:26 2024 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F327C7EE43 for ; Thu, 24 Aug 2023 07:39:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240421AbjHXHi4 (ORCPT ); Thu, 24 Aug 2023 03:38:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240455AbjHXHic (ORCPT ); Thu, 24 Aug 2023 03:38:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D78131705 for ; Thu, 24 Aug 2023 00:38:24 -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 7376565E0A for ; Thu, 24 Aug 2023 07:38:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F1D2C43397; Thu, 24 Aug 2023 07:38:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692862703; bh=+Z34z/S8rQGwpCMx4NBHY18dHHBoGvStdyvTsjgtCck=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UupkmrNOgh56ldj2NhYcCjaK1ekkrhSYtHSJIKSrt3GsYyG5hKKb5RRUL6pjUBcTD hnEigFUDoyrGQYGMEqaKzFmqGmV6ZKZBNt76OZ7j7vFcrIS4SXWyKrZywfplNEDSju n9dDf3ngrL4Hc92XMBk83IyuckgsT9x1WUBcJesAQ1rv2Zobb/RtAbygYXM0Qv0vIX 2owH56tvoMH1fQTTNeQiNaGzXzFaAWM3ltAhydf57y8UsxDB8eGhiCzOStjL30OA4Z g64pgZq98rjhAAV7VpMbjGxfoUeW3SpL/e/YcHS0GeK6+KrGeaY2mQzCxZ039TeN/F 7LJndWX7fhIXA== From: Lee Jones To: lee@kernel.org Cc: linux-kernel@vger.kernel.org, Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Mario Limonciello , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH 20/20] drm/amd/amdgpu/imu_v11_0: Increase buffer size to ensure all possible values can be stored Date: Thu, 24 Aug 2023 08:37:05 +0100 Message-ID: <20230824073710.2677348-21-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes the following W=3D1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/imu_v11_0.c: In function =E2=80=98imu_v11_0_ini= t_microcode=E2=80=99: drivers/gpu/drm/amd/amdgpu/imu_v11_0.c:52:54: warning: =E2=80=98_imu.bin= =E2=80=99 directive output may be truncated writing 8 bytes into a region o= f size between 4 and 33 [-Wformat-truncation=3D] drivers/gpu/drm/amd/amdgpu/imu_v11_0.c:52:9: note: =E2=80=98snprintf=E2=80= =99 output between 16 and 45 bytes into a destination of size 40 Signed-off-by: Lee Jones --- Cc: Alex Deucher Cc: "Christian K=C3=B6nig" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: Mario Limonciello Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org --- drivers/gpu/drm/amd/amdgpu/imu_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c b/drivers/gpu/drm/amd/a= mdgpu/imu_v11_0.c index 4ab90c7852c3e..ca123ff553477 100644 --- a/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c @@ -39,7 +39,7 @@ MODULE_FIRMWARE("amdgpu/gc_11_0_4_imu.bin"); =20 static int imu_v11_0_init_microcode(struct amdgpu_device *adev) { - char fw_name[40]; + char fw_name[45]; char ucode_prefix[30]; int err; const struct imu_firmware_header_v1_0 *imu_hdr; --=20 2.42.0.rc1.204.g551eb34607-goog