]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Squelch smatch warning for statement with no effect
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 13 Sep 2017 10:57:54 +0000 (11:57 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 13 Sep 2017 12:27:20 +0000 (13:27 +0100)
commitaa3799c92f230a115f089cc7fc0710f9d940d664
tree43d88e83c018254953a7d52af50027b639090aee
parent641ba4abd6185e467fe394d08ab33701a7b7ce9d
drm/i915: Squelch smatch warning for statement with no effect

The sgt iterators cause an

drivers/gpu/drm/i915/i915_gpu_error.c:846 i915_error_object_create() warn: statement has no effect 7

everywhere they are used. If we change the code slightly, we can achieve
the same increment without altering the output or raising a warning.

   text    data     bss     dec     hex filename
1267906   20587    3168 1291661  13b58d before
1267906   20587    3168 1291661  13b58d after

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170913105754.4423-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_drv.h