On Wed, Jun 01, 2016 at 06:04:40PM +0100, Chris Wilson wrote: > On Wed, Jun 01, 2016 at 05:01:13PM +0100, Damien Lespiau wrote: > > We exit early if has_aliasing_ppgtt is 0, so towards the end of the > > function has_aliasing_ppgtt can only be 1. > > > > Also: > > > > if (foo) > > return 1; > > else > > return 0; > > > > when foo is already a bool is really just: > > > > return foo; > > > > Signed-off-by: Damien Lespiau <damien.lespiau@xxxxxxxxx> > > --- > > drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c > > index 4668477..6aae4b8 100644 > > --- a/drivers/gpu/drm/i915/i915_gem_gtt.c > > +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c > > @@ -161,7 +161,7 @@ int intel_sanitize_enable_ppgtt(struct drm_i915_private *dev_priv, > > if (INTEL_GEN(dev_priv) >= 8 && i915.enable_execlists) > > return has_full_48bit_ppgtt ? 3 : 2; > > else > > - return has_aliasing_ppgtt ? 1 : 0; > > + return has_aliasing_ppgtt; > > /* full-ppgtt doesn't yet work reliably in legacy ringbuffer mode */ > if (!i915.enable_execlists) > return 1; > > return has_full_48bit_ppgtt ? 3 : 2; This fell through the cracks. We'd need it to improve the output from static checkers. --Imre > > -- > Chris Wilson, Intel Open Source Technology Centre > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/intel-gfx _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx