]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/i915: Remove redundant WARN_ON from __i915_add_request()
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 15 Aug 2016 09:48:46 +0000 (10:48 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 15 Aug 2016 10:00:53 +0000 (11:00 +0100)
It's an outright programming error, so explode if it is ever hit.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-7-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_request.c

index 8a9e9bfeea0934ef5801e89c92b821c4b9b4b667..4c5b7e104f2ff1f2598e30557a5151b4514750da 100644 (file)
@@ -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