linux-4.2-rc1/drivers/gpu/drm/radeon/cik.c:1912: dead code block ?

Alex Deucher alexdeucher at gmail.com
Tue Jul 7 10:14:20 PDT 2015


On Tue, Jul 7, 2015 at 6:56 AM, David Binderman <dcb314 at hotmail.com> wrote:
> Hello there,
>
> [linux-4.2-rc1/drivers/gpu/drm/radeon/cik.c:1912] -> [linux-4.2-rc1/drivers/gpu/drm/radeon/cik.c:1913]: (warning) Opposite conditions in nested 'if' blocks lead to a dead code block.
>
> Source code is
>
>    if (running == 0) {
>         if (running) {
>             blackout = RREG32(MC_SHARED_BLACKOUT_CNTL);
>             WREG32(MC_SHARED_BLACKOUT_CNTL, blackout | 1);
>         }

It's there mainly as a reminder that we need to blackout the mc before
updating the ucode and then unblack it out at the end.  Originally
this code was divided into several functions and the checks were
necessary.

Alex

>
> Regards
>
> David Binderman
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel


More information about the dri-devel mailing list