Message ID | 20170214152901.20361-1-tvrtko.ursulin@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Feb 14, 2017 at 03:29:01PM +0000, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > > For some reason my compiler (and CI as well) failed to spot the > uninitialized ret in mi_set_context. > > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > Fixes: 73dec95e6ba3 ("drm/i915: Emit to ringbuffer directly") > Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > Cc: Chris Wilson <chris@chris-wilson.co.uk> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Ah, it was only because I don't have that redundant flush did my compile spot the uninit ret. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> -Chris
On 14/02/2017 19:22, Patchwork wrote: > == Series Details == > > Series: drm/i915: Fix uninitialized return from mi_set_context > URL : https://patchwork.freedesktop.org/series/19642/ > State : success > > == Summary == > > Series 19642v1 drm/i915: Fix uninitialized return from mi_set_context > https://patchwork.freedesktop.org/api/1.0/series/19642/revisions/1/mbox/ > > fi-bdw-5557u total:252 pass:241 dwarn:0 dfail:0 fail:0 skip:11 > fi-bsw-n3050 total:252 pass:213 dwarn:0 dfail:0 fail:0 skip:39 > fi-bxt-j4205 total:252 pass:233 dwarn:0 dfail:0 fail:0 skip:19 > fi-bxt-t5700 total:83 pass:70 dwarn:0 dfail:0 fail:0 skip:12 > fi-byt-j1900 total:252 pass:225 dwarn:0 dfail:0 fail:0 skip:27 > fi-byt-n2820 total:252 pass:221 dwarn:0 dfail:0 fail:0 skip:31 > fi-hsw-4770 total:252 pass:236 dwarn:0 dfail:0 fail:0 skip:16 > fi-hsw-4770r total:252 pass:236 dwarn:0 dfail:0 fail:0 skip:16 > fi-ilk-650 total:252 pass:202 dwarn:0 dfail:0 fail:0 skip:50 > fi-ivb-3520m total:252 pass:234 dwarn:0 dfail:0 fail:0 skip:18 > fi-ivb-3770 total:252 pass:234 dwarn:0 dfail:0 fail:0 skip:18 > fi-kbl-7500u total:252 pass:234 dwarn:0 dfail:0 fail:0 skip:18 > fi-skl-6260u total:252 pass:242 dwarn:0 dfail:0 fail:0 skip:10 > fi-skl-6700hq total:252 pass:235 dwarn:0 dfail:0 fail:0 skip:17 > fi-skl-6700k total:252 pass:230 dwarn:4 dfail:0 fail:0 skip:18 > fi-skl-6770hq total:252 pass:242 dwarn:0 dfail:0 fail:0 skip:10 > fi-snb-2520m total:252 pass:224 dwarn:0 dfail:0 fail:0 skip:28 > fi-snb-2600 total:252 pass:223 dwarn:0 dfail:0 fail:0 skip:29 > > 7b80cb5504b3b3cebaea944d35f25e27415e89a6 drm-tip: 2017y-02m-14d-14h-36m-43s UTC integration manifest > 579751c drm/i915: Fix uninitialized return from mi_set_context Pushed, thanks for the bug report and the review! Regards, Tvrtko
diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index 9037356536dc..262452055563 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@ -604,7 +604,7 @@ mi_set_context(struct drm_i915_gem_request *req, u32 hw_flags) i915.semaphores ? INTEL_INFO(dev_priv)->num_rings - 1 : 0; - int len, ret; + int len; /* w/a: If Flush TLB Invalidation Mode is enabled, driver must do a TLB * invalidation prior to MI_SET_CONTEXT. On GEN6 we don't set the value @@ -612,7 +612,7 @@ mi_set_context(struct drm_i915_gem_request *req, u32 hw_flags) * itlb_before_ctx_switch. */ if (IS_GEN6(dev_priv)) { - ret = engine->emit_flush(req, EMIT_INVALIDATE); + int ret = engine->emit_flush(req, EMIT_INVALIDATE); if (ret) return ret; } @@ -687,7 +687,7 @@ mi_set_context(struct drm_i915_gem_request *req, u32 hw_flags) intel_ring_advance(req, cs); - return ret; + return 0; } static int remap_l3(struct drm_i915_gem_request *req, int slice)