Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17257394ybl; Thu, 2 Jan 2020 01:50:31 -0800 (PST) X-Google-Smtp-Source: APXvYqx0+ZsMkFSR5KHPEwIYxWRCwenXY9kSrTpJQAaRRL0fqAvxaM6nECLSDB35S1GgM3iDg2Wz X-Received: by 2002:a05:6830:1251:: with SMTP id s17mr89578055otp.108.1577958630956; Thu, 02 Jan 2020 01:50:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577958630; cv=none; d=google.com; s=arc-20160816; b=DOHrr3awNqK4NCkqxxT2Dkb/ZjMutK+qLAZpUz4Z5Vsl1rfGElDjCUsCtY2tLNE1OW SFgUfnHqTEK4GQFNlIBOOQpNGrsg9DtOy4jUycbgb2YSUA3yqVbuzz1cjAM1fj09hsMl x8NvhOcr0ucNBLRlCiwC03LKsUuUIRyY3XZr9sGuZxBQjoJBTATtl6Vy8Aw9RpqE9XlZ 8nFfWflYALAbxCx6VL9OiBeK7/2czWwW19Fz3aSUG+ozxuHmirRi3gD2ZUSK3Oxy1meA kb4ATfhfEUxFLDYdcp4k04/aMvopsxDrgyH20diWaHCf4P+D7P4fWYvzx4dKhEWBXp9P Zxpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from :dkim-signature; bh=8CFwwBAmgqgcgGzucLPpxl2tYfKM/hG3OYkRoe8WYPU=; b=AmhYyuBiforZgDTVd4QSmNhoOWUVwWiorl74UXP1QrMOxnHmhe6yjYORVXpjc61hOx ieGfINwbWqsMXkDW6T9dsBERtxucT1V2Ay2UCuY+Dt9+ZnfpP+5LngSq9qMa9sXg7O0U IcwyfveWHPlR2MTqwAmmaa1g1pHwm9SLQte0VJMpWbFgoW9gTDUBuJJGd1LSrFjCGlbv GBBZvRqrlTyUcW4ep31vNGSThiROAKjfekhrYLIkb/rfbw/vD8oqMQa6VMA4JCOiYmHZ kVAs+9p6H/p0z4wxeTI2O04+5RMGTy4Fyr6T1EyAKetQL17UCutQcxF2nrlA5tDxn+Lz c4TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="d4HlM1/T"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g14si20436717otj.10.2020.01.02.01.50.18; Thu, 02 Jan 2020 01:50:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="d4HlM1/T"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727973AbgABJt1 (ORCPT + 99 others); Thu, 2 Jan 2020 04:49:27 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:37054 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727924AbgABJt1 (ORCPT ); Thu, 2 Jan 2020 04:49:27 -0500 Received: by mail-wm1-f66.google.com with SMTP id f129so5122482wmf.2 for ; Thu, 02 Jan 2020 01:49:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=8CFwwBAmgqgcgGzucLPpxl2tYfKM/hG3OYkRoe8WYPU=; b=d4HlM1/TBFOTa6XiDaYcMZwGiUc51p4Pv0bBSbInlqbpvi1cIco9U5kLvaLBYdgLZW VaS9zaAFFO6S9Oc1lQKYNjDjrW4NCYPPoAu2ovrM6Ubd7GXc1PE5pL1VJO/hxapXCaGs 67jqWjWasTK8FQwLLx1skppJitsfvMVOrZj0VmXyeKVyh4z0Vra7l/Crr3ECYLm6CykX oxqwJsl5db2DHXHUXn4sDy40dp9gi9B2akAWlnOMkfkFUIyx1HfMAiBGefzkP+r6Oiff jVKJPkTI+/VZiHFbipEqUL+f80TtVzegY+kexQHhFwwRwokXHzqlk2187GJ7o2Ay5dIP aa5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=8CFwwBAmgqgcgGzucLPpxl2tYfKM/hG3OYkRoe8WYPU=; b=iZOh+JjMk3omTBZ8N0Y/99/VnjtugMX2mJeVexc6UHKwd3gDG7n5xBI5ak4DAp+P+I kzxoDsewmOLfjfJAH7cDUPr3Vn4yDsOdBHnsV0YLFkzm19F7R+tRiYFcoLoeaaTLFOgC N+86UgDobaRgzt+pjmzFDldKjwziH6AlMcotkAr6dsNi2cHwMfLz0Ud0rTXwmBuD60YS KBm+BhIkzw3dFcNsCGqdo1JuuvYn1UBNIkeVRLWhR+cMGWdu+PmGv7DY5bq9gGOdIxZw WZ8+nGJTQeNo3ZQpNxQR2njkxkS0Bt4LBNeC0r/kdpIvV7QXdsVSCqAcF/qB8N3r91qt zD5w== X-Gm-Message-State: APjAAAWjSNUKBoNOru2OTdOs4Jm65bFz0gZNo3RPKkT1T0rpm++iiKYr YMvdHDDXnFGUtDgWjTZgtkw= X-Received: by 2002:a1c:964f:: with SMTP id y76mr13491283wmd.62.1577958565901; Thu, 02 Jan 2020 01:49:25 -0800 (PST) Received: from localhost.localdomain ([197.254.95.38]) by smtp.googlemail.com with ESMTPSA id h66sm8383963wme.41.2020.01.02.01.49.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jan 2020 01:49:25 -0800 (PST) From: Wambui Karuga To: jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, airlied@linux.ie, daniel@ffwll.ch, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/i915: remove boolean comparisons in conditionals. Date: Thu, 2 Jan 2020 12:49:21 +0300 Message-Id: <20200102094921.6274-1-wambui.karugax@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove unnecessary comparisons to true/false in if statements. Issues found by coccinelle. Signed-off-by: Wambui Karuga --- 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(-) diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c index 9ba794cb9b4f..c065078b3be2 100644 --- a/drivers/gpu/drm/i915/display/intel_ddi.c +++ b/drivers/gpu/drm/i915/display/intel_ddi.c @@ -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; diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index aa515261cb9f..93140c75386a 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -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 && diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c index 47f5d87a938a..cff254c52f5e 100644 --- a/drivers/gpu/drm/i915/display/intel_sdvo.c +++ b/drivers/gpu/drm/i915/display/intel_sdvo.c @@ -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! */ -- 2.17.1