public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915/tc: Use standard ternary operator instead of GCC extension
@ 2023-06-08 22:00 Gil Dekel
  2023-06-08 23:00 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Gil Dekel @ 2023-06-08 22:00 UTC (permalink / raw)
  To: intel-gfx, seanpaul, navaremanasi; +Cc: Gil Dekel, Rodrigo Vivi

The ternary expression:

  x ? : y

is a GCC extension and is not a part of C/C++ standard.

Use the canonical form instead to reduce dependency over GCC extension.

Signed-off-by: Gil Dekel <gildekel@chromium.org>
---
 drivers/gpu/drm/i915/display/intel_display_power_well.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_power_well.c b/drivers/gpu/drm/i915/display/intel_display_power_well.c
index 916009894d89c..39d0dbad589bf 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power_well.c
+++ b/drivers/gpu/drm/i915/display/intel_display_power_well.c
@@ -255,7 +255,9 @@ static void hsw_wait_for_power_well_enable(struct drm_i915_private *dev_priv,
 {
 	const struct i915_power_well_regs *regs = power_well->desc->ops->regs;
 	int pw_idx = i915_power_well_instance(power_well)->hsw.idx;
-	int timeout = power_well->desc->enable_timeout ? : 1;
+	int timeout = power_well->desc->enable_timeout ?
+			      power_well->desc->enable_timeout :
+			      1;

 	/*
 	 * For some power wells we're not supposed to watch the status bit for
--
Gil Dekel, Software Engineer, Google / ChromeOS Display and Graphics

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

end of thread, other threads:[~2023-06-10  7:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-08 22:00 [Intel-gfx] [PATCH] drm/i915/tc: Use standard ternary operator instead of GCC extension Gil Dekel
2023-06-08 23:00 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2023-06-09  9:15 ` [Intel-gfx] [PATCH] " Jani Nikula
2023-06-10  7:58 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox