From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796068583; b=RoeJ25nEKFn/Q914TPsN6aLkXBfhj8RIPPTHJYEMQ91CeWzyakub2+r8tvo7U43F3Z3L 9n2SEmC+xJSpx7nqW7p2X6dNKCRx0okw96xRhUbQvwbgNrjfhOBpcdJTOvmv4fUxhAC/3 CBvymox0DzAK3RD2fXoEdlfwZSsQE/3AtKjIgZhDf6gGwtF6eW3zJlsLfc0Q1qmdYfZRg s05FQxs1oATldMhb8Q0fe0az3PGO7TmadHi0JBBBz6TNI2kPdwVorOXPD2sCay26mTrI4 PRPElzAOHG/bopVIxBYPDFNkI8R3CzHis6MAXilKBoAO9/DPHKlKD5JXXmcCLE0fRhA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796068583; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; bh=PAqt7CeL/AWFt/cV313V3J8oVEk2M/w0AIpRZVBMsYU=; b=J6LMG2wYw+mDo6xD+na0c7wh8cGYWXZ52WFMgucqOJy+iEgahrIhEDG+7q7uNjjjHw9h bLfX/Q3KI55FRtIx1I60O663W0yV2/Ht0q2iOlot+WimNeZRyqAOJUOJLm/xxGnlhwTuD f6dmn3sAZrZ6B2RcXLG+e+E9Ypl/XdrHDqW2WK6UoYqv/1XkyBpubgfNeXJ2WR1E/BxZC nY4QW5gehgaTpW32P6Z13MakEFUTAAk/Rfw9dSWPFRWJQMxlJj5FPUZpRD5/w9FWoYjFw QaOnfRcbau2cVsshoRAN1y2vnypzFzF+vQJT6bnTZATuvTWJ9NTzvaTWkWUgOSeJ15w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=SHDclfta; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CBA79606A33A for ; Mon, 30 Nov 2026 19:56:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=SHDclfta Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF8111F0089F; Mon, 30 Nov 2026 19:56:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796068583; bh=PAqt7CeL/AWFt/cV313V3J8oVEk2M/w0AIpRZVBMsYU=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=SHDclftaG08EVef2m3HssWfMTVEOf+9efNXLD/w8hhkFwfd/n+X8U1x7Url0NIhyN 1s9F1ppC8IQugh2Jz3b8rZ5MD7Plr+T9cVCectkCLZEbhMHZ/EqpUc6P1QkCot9i89 4PtISYWrxjH8j1dElr0JfRCqiIYcAI8d2A2VwewgL7RViziz/XnWoztItpSmvxK43P XFpKCd8CgjDplkTQ/RQXfCpkvqHd6UtiNwmNNHX+jlbTy4VYJuoHq5LPcUa5Aktpgc osV9tH7bruq0Vwjpg8+OtYs5UcU8mpPO0dqO17cJNk7fwVgsEmNde9iIIdne8I7pAO d/6or1YlrPGHA== Date: Mon, 30 Nov 2026 12:56:18 -0700 From: Nathan Chancellor To: Alex Deucher Cc: Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= , Hawking Zhang , Frank Min , Likun Gao , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, llvm@lists.linux.dev Subject: Re: [PATCH] drm/amdgpu: Initialize data to NULL in imu_v13_0_program_rlc_ram() Message-ID: <20261130195618.GA1098533@ax162> References: <20261128-amdgpu-uninitialized-data-imu_v13_0-v1-1-e2c0ddb75ee7@kernel.org> X-Mailing-List: llvm@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, Nov 30, 2026 at 11:58:38AM -0500, Alex Deucher wrote: > On Sat, Nov 28, 2026 at 11:26 AM Nathan Chancellor wrote: > > > > Clang warns (or errors with CONFIG_WERROR=y / W=e): > > > > drivers/gpu/drm/amd/amdgpu/imu_v13_0.c:264:30: error: variable 'data' is uninitialized when used here [-Werror,-Wuninitialized] > > 264 | program_imu_rlc_ram(adev, data, (const u32)size); > > | ^~~~ > > > > It is not wrong that data is passed to program_imu_rlc_ram() > > uninitialized but since this warning happens early in clang's frontend, > > it cannot see program_imu_rlc_ram() is meber called due to r being > > -EINVAL and even if it were, data would not be dereferenced because size > > is 0, so it is never actually used uninitialized. > > > > It is bad form to pass uninitialized values to functions even if they > > are not used, so just initialize data to NULL to silence the warning, as > > it will need to be properly set up when support for calling > > program_imu_rlc_ram() is added. > > > > Fixes: 9caddf5f7de7 ("drm/amdgpu: Add imu v13 ip block v2") > > Signed-off-by: Nathan Chancellor > > I already squashed the identical change into the original patch last week. Ah, my apologies. I used the tree that -next pulls in as a base (the drm-next branch of your agd5f/linux.git) but I see now that the drm-amdgpu-next branch of drm/amdgpu/kernel has the correction. Sorry for the noise. I assume a sync will happen at some point to make this go away for -next? -- Cheers, Nathan