drm/i915: remove boolean comparisons in conditionals.
Subsystems (3)
PATCH 1/1 drm/i915: remove boolean comparisons in conditionals.
Remove unnecessary comparisons to true/false in if statements. Issues found by coccinelle.
--- drivers/gpu/drm/i915/display/intel_ddi.c | 2 +- drivers/gpu/drm/i915/display/intel_dp.c | 2 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/display/intel_ddi.c +1 -1
@@ -1812,7 +1812,7 @@ void intel_ddi_set_vc_payload_alloc(const struct intel_crtc_state *crtc_state,u32 temp; temp =I915_READ (TRANS_DDI_FUNC_CTL (cpu_transcoder)); -if (state == true) +if (state) temp |=TRANS_DDI_DP_VC_PAYLOAD_ALLOC ;else temp &= ~TRANS_DDI_DP_VC_PAYLOAD_ALLOC ;
drivers/gpu/drm/i915/display/intel_dp.c +1 -1
@@ -4958,7 +4958,7 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)WARN_ON_ONCE (intel_dp->active_mst_links <0 ); bret =intel_dp_get_sink_irq_esi (intel_dp, esi); go_again: -if (bret == true) { +if (bret) {/* check link status - esi[10] = 0x200c */ if (intel_dp->active_mst_links > 0 &&
drivers/gpu/drm/i915/display/intel_sdvo.c +2 -2
@@ -3292,8 +3292,8 @@ bool intel_sdvo_init(struct drm_i915_private *dev_priv,if (!intel_sdvo_get_capabilities (intel_sdvo, &intel_sdvo->caps)) goto err; -if (intel_sdvo_output_setup (intel_sdvo, - intel_sdvo->caps.output_flags) != true) { +if (!intel_sdvo_output_setup (intel_sdvo, + intel_sdvo->caps.output_flags)) {DRM_DEBUG_KMS ("SDVO output failed to setup on %s\n" ,SDVO_NAME (intel_sdvo));/* Output_setup can leave behind connectors! */
Signature · 1 line
2.17.1
Quoted 4 lines · Wambui Karuga
Remove unnecessary comparisons to true/false in if statements. Issues found by coccinelle.
Signed-off-by Wambui Karuga <[email protected]>
Thanks for the patch.
Quoted 47 lines
--- drivers/gpu/drm/i915/display/intel_ddi.c | 2 +- drivers/gpu/drm/i915/display/intel_dp.c | 2 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/display/intel_ddi.c +1
-1@@ -1812,7 +1812,7 @@ void intel_ddi_set_vc_payload_alloc(const struct intel_crtc_state *crtc_state,u32 temp; temp =I915_READ (TRANS_DDI_FUNC_CTL (cpu_transcoder)); -if (state == true) +if (state) temp |=TRANS_DDI_DP_VC_PAYLOAD_ALLOC ;else temp &= ~TRANS_DDI_DP_VC_PAYLOAD_ALLOC ;drivers/gpu/drm/i915/display/intel_dp.c +1
-1@@ -4958,7 +4958,7 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)WARN_ON_ONCE (intel_dp->active_mst_links <0 ); bret =intel_dp_get_sink_irq_esi (intel_dp, esi); go_again: -if (bret == true) { +if (bret) {/* check link status - esi[10] = 0x200c */ if (intel_dp->active_mst_links > 0 &&drivers/gpu/drm/i915/display/intel_sdvo.c +2
-2@@ -3292,8 +3292,8 @@ bool intel_sdvo_init(struct drm_i915_private *dev_priv,if (!intel_sdvo_get_capabilities (intel_sdvo, &intel_sdvo->caps)) goto err; -if (intel_sdvo_output_setup (intel_sdvo, - intel_sdvo->caps.output_flags) != true) { +if (!intel_sdvo_output_setup (intel_sdvo, + intel_sdvo->caps.output_flags)) {DRM_DEBUG_KMS ("SDVO output failed to setup on %s\n" ,SDVO_NAME (intel_sdvo));/* Output_setup can leave behind connectors! */
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: remove boolean comparisons in conditionals.
In reply to Wambui Karuga== Series Details ==
== Series Details ==
Series: drm/i915: remove boolean comparisons in conditionals.
URL : https://patchwork.freedesktop.org/series/71569/
State : failure
== Summary ==
Applying: drm/i915: remove boolean comparisons in conditionals. Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/display/intel_ddi.c
M drivers/gpu/drm/i915/display/intel_dp.c
M drivers/gpu/drm/i915/display/intel_sdvo.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/display/intel_sdvo.c Auto-merging drivers/gpu/drm/i915/display/intel_dp.c
Auto-merging drivers/gpu/drm/i915/display/intel_ddi.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/display/intel_ddi.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch Patch failed at 0001 drm/i915: remove boolean comparisons in conditionals. When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx