Re: [PATCH 1/2] drm/i915: Encapsulate kconfig constant values inside boolean predicates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 25, 2019 at 02:59:42PM +0100, Chris Wilson wrote:
> Avoid angering clang and smatch by using a constant value in a '&&' test,
> by forcing that constant value into a boolean.
> 
> E.g.,
> drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c:159:13: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
> 	if (!delay && CONFIG_DRM_I915_PREEMPT_TIMEOUT) {
>                       ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Reported-by: kbuild test robot <lkp@xxxxxxxxx>
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Nathan Chancellor <natechancellor@xxxxxxxxx>
> Cc: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
> Cc: Jani Nikula <jani.nikula@xxxxxxxxx>

LGTM, thank you for the fix!

Reviewed-by: Nathan Chancellor <natechancellor@xxxxxxxxx>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux