Message ID | CAPM=9twrkJdUqTLXXsNygtzkrc4P2iyw4kwU1T83D4_+-gdpDA@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [git,pull] drm fixes for 5.11-rc1 | expand |
The pull request you sent on Thu, 24 Dec 2020 12:29:16 +1000:
> git://anongit.freedesktop.org/drm/drm tags/drm-next-2020-12-24
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/ef2c8b81b88868f042579b9dd021cc9edbc2d0c6
Thank you!
On Wed, Dec 23, 2020 at 6:29 PM Dave Airlie <airlied@gmail.com> wrote: > > Xmas eve pull request present. Just some fixes that trickled in this > past week. Mostly amdgpu fixes, with a dma-buf/mips build fix and some > misc komeda fixes. Well, I already pulled and pushed out my merge, but only noticed afterwards that clang complains about this, and I think it's a real bug: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_mpc.c:475:6: warning: variable 'val' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] and it sure is true: the code literally does uint32_t val; if (opp_id < MAX_OPP && REG(MUX[opp_id])) REG_GET(MUX[opp_id], MPC_OUT_MUX, &val); return val; so clearly 'val' isn't initialized if that if-statement isn't true. I assume 'opp_id' is always presumed to be valid, but that code really is disgusting. Just make it return 0 (or whatever) for invalid, possibly together with a WARN_ON_ONCE(). Ok? Linus
On Thu, Dec 24, 2020 at 5:28 PM Linus Torvalds <torvalds@linux-foundation.org> wrote: > > On Wed, Dec 23, 2020 at 6:29 PM Dave Airlie <airlied@gmail.com> wrote: > > > > Xmas eve pull request present. Just some fixes that trickled in this > > past week. Mostly amdgpu fixes, with a dma-buf/mips build fix and some > > misc komeda fixes. > > Well, I already pulled and pushed out my merge, but only noticed > afterwards that clang complains about this, and I think it's a real > bug: > > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_mpc.c:475:6: warning: > variable 'val' is used uninitialized whenever 'if' condition is > false [-Wsometimes-uninitialized] > > and it sure is true: the code literally does > > uint32_t val; > > if (opp_id < MAX_OPP && REG(MUX[opp_id])) > REG_GET(MUX[opp_id], MPC_OUT_MUX, &val); > > return val; > > so clearly 'val' isn't initialized if that if-statement isn't true. > > I assume 'opp_id' is always presumed to be valid, but that code really > is disgusting. > > Just make it return 0 (or whatever) for invalid, possibly together > with a WARN_ON_ONCE(). Ok? Harry, Nick, Hersen, Can you take a look? Thanks, Alex > > Linus > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel
[AMD Official Use Only - Internal Distribution Only] ++Siqueira. Regards, Bindu
Hi, This patch should fix the issue: https://patchwork.freedesktop.org/patch/410754/?series=85303&rev=1 Thanks On 12/29, R, Bindu wrote: > [AMD Official Use Only - Internal Distribution Only] > > ++Siqueira. > Regards, > Bindu > > ══════════════════════════════════════════════════════════════════════════ > > From: Alex Deucher <alexdeucher@gmail.com> > Sent: Tuesday, December 29, 2020 10:07 AM > To: Linus Torvalds <torvalds@linux-foundation.org>; Wentland, Harry > <Harry.Wentland@amd.com>; Kazlauskas, Nicholas > <Nicholas.Kazlauskas@amd.com>; Wu, Hersen <hersenxs.wu@amd.com> > Cc: Dave Airlie <airlied@gmail.com>; Pavic, Josip <Josip.Pavic@amd.com>; > R, Bindu <Bindu.R@amd.com>; Deucher, Alexander > <Alexander.Deucher@amd.com>; Daniel Vetter <daniel.vetter@ffwll.ch>; LKML > <linux-kernel@vger.kernel.org>; dri-devel > <dri-devel@lists.freedesktop.org> > Subject: Re: [git pull] drm fixes for 5.11-rc1 > > On Thu, Dec 24, 2020 at 5:28 PM Linus Torvalds > <torvalds@linux-foundation.org> wrote: > > > > On Wed, Dec 23, 2020 at 6:29 PM Dave Airlie <airlied@gmail.com> wrote: > > > > > > Xmas eve pull request present. Just some fixes that trickled in this > > > past week. Mostly amdgpu fixes, with a dma-buf/mips build fix and some > > > misc komeda fixes. > > > > Well, I already pulled and pushed out my merge, but only noticed > > afterwards that clang complains about this, and I think it's a real > > bug: > > > > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_mpc.c:475:6: > warning: > > variable 'val' is used uninitialized whenever 'if' condition is > > false [-Wsometimes-uninitialized] > > > > and it sure is true: the code literally does > > > > uint32_t val; > > > > if (opp_id < MAX_OPP && REG(MUX[opp_id])) > > REG_GET(MUX[opp_id], MPC_OUT_MUX, &val); > > > > return val; > > > > so clearly 'val' isn't initialized if that if-statement isn't true. > > > > I assume 'opp_id' is always presumed to be valid, but that code really > > is disgusting. > > > > Just make it return 0 (or whatever) for invalid, possibly together > > with a WARN_ON_ONCE(). Ok? > > Harry, Nick, Hersen, > > Can you take a look? > > Thanks, > > Alex > > > > > Linus > > _______________________________________________ > > dri-devel mailing list > > dri-devel@lists.freedesktop.org > > > [1]https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fdri-devel&data=04%7C01%7Cbindu.r%40amd.com%7Cae8f547c9287426b9b9408d8ac0b7b73%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637448512618562550%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=4gcQRS3HI4u1UEWu35Ze1w5CLWmAof5nouCFQoKEQD0%3D&reserved=0 > > References > > Visible links > 1. https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fdri-devel&data=04%7C01%7Cbindu.r%40amd.com%7Cae8f547c9287426b9b9408d8ac0b7b73%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637448512618562550%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=4gcQRS3HI4u1UEWu35Ze1w5CLWmAof5nouCFQoKEQD0%3D&reserved=0