drm/i915: Fix new -Wint-in-bool-context gcc compiler warning
Subsystems (2)
PATCH 1/1 drm/i915: Fix new -Wint-in-bool-context gcc compiler warning
This commit fixes the following compiler warning:
drivers/gpu/drm/i915/intel_dsi.c: In function ‘intel_dsi_prepare’:drivers/gpu/drm/i915/intel_dsi.c:1487:23: warning:
?: using integer constants in boolean context [-Wint-in-bool-context]
PORT_A ? PORT_C : PORT_A),
Signed-off-by Hans de Goede <[email protected]>
--- drivers/gpu/drm/i915/i915_reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_reg.h +1 -1
@@ -8276,7 +8276,7 @@ enum {/* MIPI DSI registers */ -#define _MIPI_PORT (port, a, c) ((port) ? c : a)/* ports A and C only */ +#define _MIPI_PORT (port, a, c) (((port) == PORT_A) ? a : c)/* ports A and C only */ #define _MMIO_MIPI (port, a, c) _MMIO(_MIPI_PORT(port, a, c))#define MIPIO_TXESC_CLK_DIV1 _MMIO(0x160004)
Signature · 6 lines
2.12.2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 8 lines · Hans de Goede
This commit fixes the following compiler warning:
drivers/gpu/drm/i915/intel_dsi.c: In function ‘intel_dsi_prepare’:drivers/gpu/drm/i915/intel_dsi.c:1487:23: warning:
?: using integer constants in boolean context [-Wint-in-bool-context]
PORT_A?PORT_C:PORT_A),Signed-off-by Hans de Goede <[email protected]>
Pushed to drm-intel-next-queued, thanks for the patch.
BR,
Jani.
Quoted 17 lines
--- drivers/gpu/drm/i915/i915_reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/i915_reg.h +1
-1@@ -8276,7 +8276,7 @@ enum {/* MIPI DSI registers */ -#define _MIPI_PORT (port, a, c) ((port) ? c : a)/* ports A and C only */ +#define _MIPI_PORT (port, a, c) (((port) == PORT_A) ? a : c)/* ports A and C only */ #define _MMIO_MIPI (port, a, c) _MMIO(_MIPI_PORT(port, a, c))#define MIPIO_TXESC_CLK_DIV1 _MMIO(0x160004)
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx