From mboxrd@z Thu Jan 1 00:00:00 1970 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 4B94DC3DA7F for ; Thu, 1 Aug 2024 00:37:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F023310E835; Thu, 1 Aug 2024 00:37:03 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="oWvqbDK8"; dkim-atps=neutral Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3A22210E835; Thu, 1 Aug 2024 00:37:03 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 5DA36CE17D8; Thu, 1 Aug 2024 00:37:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64F48C4AF0C; Thu, 1 Aug 2024 00:36:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722472620; bh=zDAPWNBv87Qqx+AtGXKPZq395SwmdpUPHqqeL4/CMgQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oWvqbDK8Ml9SDvupex566NHwl//umXAeGqm3hTEauRG7Aa8JdpDjT5GkJWZm0pJZj PI6Ds56HKB7ybgJFrtc8AKAKu5NVnpFi5UmRilGLFKG2DoF2Hfdrw87Pqj0hwdEWcB BnaliJemY52lbCtnBLrIf+y+AXO0JJBvbQX47sJnbIbWf0LPJdmzE67CbzTZlZ7jDJ RHR1ApH4Pl/L/t5hUaff58zo3ljdMFPajoTCZ72LMtXz5VFS6e1Ozv6LhYTX0VYT7a b+u+lhi9Ic0bzwJvx8Ce5neKqJzKU8P1rdLUR4ZFASxNgDuVt13j3iDuFj45Q5YeMt 4rkIbMNhhPyNA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tim Huang , =?UTF-8?q?Christian=20K=C3=B6nig?= , Alex Deucher , Sasha Levin , Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch, lijo.lazar@amd.com, Zhigang.Luo@amd.com, Hawking.Zhang@amd.com, Yunxiang.Li@amd.com, victor.skvortsov@amd.com, victorchengchi.lu@amd.com, Vignesh.Chander@amd.com, surbhi.kakarya@amd.com, danijel.slivka@amd.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.10 04/38] drm/amdgpu: fix uninitialized scalar variable warning Date: Wed, 31 Jul 2024 20:35:10 -0400 Message-ID: <20240801003643.3938534-4-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240801003643.3938534-1-sashal@kernel.org> References: <20240801003643.3938534-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 5.10.223 Content-Transfer-Encoding: 8bit X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" From: Tim Huang [ Upstream commit 9a5f15d2a29d06ce5bd50919da7221cda92afb69 ] Clear warning that uses uninitialized value fw_size. Signed-off-by: Tim Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c index d6f2951035959..bd53844a8ba4d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c @@ -404,6 +404,8 @@ static void amdgpu_virt_add_bad_page(struct amdgpu_device *adev, uint64_t retired_page; uint32_t bp_idx, bp_cnt; + memset(&bp, 0, sizeof(bp)); + if (bp_block_size) { bp_cnt = bp_block_size / sizeof(uint64_t); for (bp_idx = 0; bp_idx < bp_cnt; bp_idx++) { -- 2.43.0