[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 10 Oct 2017 15:36:16 +0100
From: Colin Ian King <colin.king@...onical.com>
To: Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Jani Nikula <jani.nikula@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
David Airlie <airlied@...ux.ie>,
intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/i915: remove redundant check on has_aliasing_ppgtt
On 10/10/17 15:35, Joonas Lahtinen wrote:
> On Tue, 2017-10-10 at 14:47 +0100, Colin King wrote:
>> From: Colin Ian King <colin.king@...onical.com>
>>
>> There is a previous check to on has_aliasing_ppgtt that returns
>> 0 if it is false, so it is impossible for has_aliasing_ppgtt to
>> be false on the final return of function intel_sanitize_enable_ppgtt,
>> so final return in the function always will return 1. Hence the
>> redundant ternary operator can be replaced with a return 1.
>>
>> Detected by CoverityScan, CID#1357136 ("Logically dead code")
>>
>> Signed-off-by: Colin Ian King <colin.king@...onical.com>
>
> Thanks, I took it a few steps further and removed the variable
> altogether. I Cc'd you on the patch.
Yep, it's an improvement on my fix. Thanks for sorting that out.
Colin
>
> Regards, Joonas
>
Powered by blists - more mailing lists