lkml.org 
[lkml]   [2017]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] drm/i915: remove redundant check on has_aliasing_ppgtt
From
Date
On Tue, 2017-10-10 at 14:47 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.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@canonical.com>

Thanks, I took it a few steps further and removed the variable
altogether. I Cc'd you on the patch.

Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation

\
 
 \ /
  Last update: 2017-10-10 16:37    [W:0.042 / U:0.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site