From: Chris Wilson Date: Mon, 15 Aug 2016 09:48:46 +0000 (+0100) Subject: drm/i915: Remove redundant WARN_ON from __i915_add_request() X-Git-Tag: v4.9-rc1~41^2~36^2~85 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=95b2ab56a53dc926eb6949ebd40a4708e32eb4f0;p=karo-tx-linux.git drm/i915: Remove redundant WARN_ON from __i915_add_request() It's an outright programming error, so explode if it is ever hit. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-7-git-send-email-chris@chris-wilson.co.uk --- diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c index 8a9e9bfeea09..4c5b7e104f2f 100644 --- a/drivers/gpu/drm/i915/i915_gem_request.c +++ b/drivers/gpu/drm/i915/i915_gem_request.c @@ -470,18 +470,12 @@ static void i915_gem_mark_busy(const struct intel_engine_cs *engine) */ void __i915_add_request(struct drm_i915_gem_request *request, bool flush_caches) { - struct intel_engine_cs *engine; - struct intel_ring *ring; + struct intel_engine_cs *engine = request->engine; + struct intel_ring *ring = request->ring; u32 request_start; u32 reserved_tail; int ret; - if (WARN_ON(!request)) - return; - - engine = request->engine; - ring = request->ring; - /* * To ensure that this call will not fail, space for its emissions * should already have been reserved in the ring buffer. Let the ring