[Intel-gfx] [v2] drm/i915/perf: Reverse a ternary to make sparse happy

Nathan Chancellor natechancellor at gmail.com
Tue Dec 3 05:05:22 UTC 2019


On Fri, Nov 01, 2019 at 07:21:16PM +0000, Chris Wilson wrote:
> Avoid
> 
> drivers/gpu/drm/i915/i915_perf.c:2442:85: warning: dubious: x | !y
> 
> simply by inverting the predicate and reversing the ternary.
> 
> v2: More the long lines into their own function so there is no confusion
> on operator precedence.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>
> Cc: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

I don't see this applied to drm-intel yet (unless I am blind) and clang
warns about this as well.

Reviewed-by: Nathan Chancellor <natechancellor at gmail.com>


More information about the Intel-gfx mailing list