All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/dp: use logical operators with boolean type
@ 2019-05-02  8:29 Jani Nikula
  2019-05-02 14:02 ` ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jani Nikula @ 2019-05-02  8:29 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula, Paulo Zanoni

Using arithmetic operators with booleans is confusing. Switch to logical
operators.

Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 4e7b8d..ef4992f 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -5094,7 +5094,7 @@ static void icl_update_tc_port_type(struct drm_i915_private *dev_priv,
 	enum port port = intel_dig_port->base.port;
 	enum tc_port_type old_type = intel_dig_port->tc_type;
 
-	WARN_ON(is_legacy + is_typec + is_tbt != 1);
+	WARN_ON(is_legacy || is_typec || !is_tbt);
 
 	if (is_legacy)
 		intel_dig_port->tc_type = TC_PORT_LEGACY;
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-05-03  7:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-02  8:29 [PATCH] drm/i915/dp: use logical operators with boolean type Jani Nikula
2019-05-02 14:02 ` ✗ Fi.CI.BAT: failure for " Patchwork
2019-05-02 15:30 ` [PATCH] " Paulo Zanoni
2019-05-03  7:30   ` Jani Nikula
2019-05-02 17:19 ` ✗ Fi.CI.BAT: failure for drm/i915/dp: use logical operators with boolean type (rev2) Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.