[Intel-gfx] [PATCH] fix boolreturn.cocci warnings

kernel test robot lkp at intel.com
Wed Aug 19 18:47:31 UTC 2020


From: kernel test robot <lkp at intel.com>

drivers/gpu/drm/i915/display/intel_atomic.c:199:9-10: WARNING: return of 0/1 in function 'intel_connector_needs_modeset' with return type bool

 Return statements in functions returning bool should use
 true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci

CC: Nischal Varide <nischal.varide at intel.com>
Signed-off-by: kernel test robot <lkp at intel.com>
---

url:    https://github.com/0day-ci/linux/commits/Nischal-Varide/Critical-KclockWork-Fixes-intel_atomi-c-PossibleNull/20200819-193249
base:   git://anongit.freedesktop.org/drm-intel for-linux-next

 intel_atomic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/i915/display/intel_atomic.c
+++ b/drivers/gpu/drm/i915/display/intel_atomic.c
@@ -196,7 +196,7 @@ intel_connector_needs_modeset(struct int
 	old_conn_state = drm_atomic_get_old_connector_state(&state->base, connector);
 	new_conn_state = drm_atomic_get_new_connector_state(&state->base, connector);
 	if (!(old_conn_state && new_conn_state))
-		return 0;
+		return false;
 
 	return old_conn_state->crtc != new_conn_state->crtc ||
 	       (new_conn_state->crtc &&


More information about the Intel-gfx mailing list