• Chris Wilson's avatar
    drm/i915: Silence smatch for cmdparser · 0ffba1fc
    Chris Wilson authored
    drivers/gpu/drm/i915/i915_cmd_parser.c:808:23: error: not an lvalue
    drivers/gpu/drm/i915/i915_cmd_parser.c:811:23: error: not an lvalue
    drivers/gpu/drm/i915/i915_cmd_parser.c:814:23: error: not an lvalue
    drivers/gpu/drm/i915/i915_cmd_parser.c:808:23: error: not an lvalue
    drivers/gpu/drm/i915/i915_cmd_parser.c:811:23: error: not an lvalue
    drivers/gpu/drm/i915/i915_cmd_parser.c:814:23: error: not an lvalue
    drivers/gpu/drm/i915/i915_cmd_parser.c:808:23: error: not an lvalue
    drivers/gpu/drm/i915/i915_cmd_parser.c:811:23: error: not an lvalue
    drivers/gpu/drm/i915/i915_cmd_parser.c:814:23: error: not an lvalue
    drivers/gpu/drm/i915/i915_cmd_parser.c:808:23: error: not an lvalue
    drivers/gpu/drm/i915/i915_cmd_parser.c:811:23: error: not an lvalue
    drivers/gpu/drm/i915/i915_cmd_parser.c:814:23: error: not an lvalue
    
    If we move the shift into each case not only do we kill the warning from
    smatch, but we shrink the code slightly:
    
       text	   data	    bss	    dec	    hex	filename
    1267906	  20587	   3168	1291661	 13b58d	before
    1267890	  20587	   3168	1291645	 13b57d	after
    Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
    Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
    Cc: Matthew Auld <matthew.william.auld@gmail.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20171107154055.19460-1-chris@chris-wilson.co.ukReviewed-by: default avatarMatthew Auld <matthew.william.auld@gmail.com>
    Reviewed-by: default avatarGabriel Krisman Bertazi <krisman@collabora.co.uk>
    0ffba1fc
i915_cmd_parser.c 41 KB