Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3889159pxb; Mon, 8 Feb 2021 02:43:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwlvvUvo55o+lZ5uI+dBMEWeXtkNaEih98zCAeVRpnmhOogdy1dreyCZkjlhVBqqFY+FP2H X-Received: by 2002:a05:6402:5207:: with SMTP id s7mr16003774edd.311.1612781011383; Mon, 08 Feb 2021 02:43:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612781011; cv=none; d=google.com; s=arc-20160816; b=mPEAuSgGe6Uvd2gzO90SfHrtDXOarCqOJvtrwtIgLxJcUVv+JtfkyF01lpeX8YypM8 s+4bJepMmVnVxJkCjv4IQeUGSIXDJ/6yhnLuR+fjKRCgtXLZE9WnqLn7hVbu7FsgkhNH Gxfla51drBCDtq7iSUTs592sAnBzBHYybZ3C/S5gKKCNMmWUyRWZA2rvOJ4hcSPTIynG ViGuEQkCPGsYwFucLHJNGwRvlwMGTDlmGwia18x+e4WTPuBHSJFnD8zGXywFaBnbHRa7 7doaS8P7jKefgrfGksaNY3vTuWTUJPa6xalekA1xaTBl7SZCL5zxsI0QDvsL9z5dfq/4 coHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=K7HzADzhdrKGOsxs6F4bS54Uh9MIRDfYtIPmSbY5s70=; b=eakBPIQwMbRDFrsuTojLs/8QbSnJDgQl7IalzyNns6dVJWryoG4R9Ey5ORW6QgXF8l 6I+vqPmtCDS8ai7vmIm4eO/0ZWGgsvkHaomdNMYETB3Xkw/Md7HDxi8+N19Z16L6BiLH HKt5oogydTQi2diqhdPNlpyHIFJljWfoqlLeCt2r/xiIarbM24q/ZZ6WsFRA1ZLxh5Tn E9LBmctu+NhT03TRDMVFd7WvYwiAOriWvl7uPMeTMH2LbUoae/ikBTs3P535VbMMhlTa 9FO8RgAo/zAkU9vgAg7aSGeb0nNRVH9IGBBdqvWr7+nd//vaK6yMXWBlcdGqiUd7bYqO G1mA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n10si10831039ejb.368.2021.02.08.02.42.58; Mon, 08 Feb 2021 02:43:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232403AbhBHKkF (ORCPT + 99 others); Mon, 8 Feb 2021 05:40:05 -0500 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:50789 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230224AbhBHKaS (ORCPT ); Mon, 8 Feb 2021 05:30:18 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04407;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0UOAeUcL_1612780169; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UOAeUcL_1612780169) by smtp.aliyun-inc.com(127.0.0.1); Mon, 08 Feb 2021 18:29:34 +0800 From: Jiapeng Chong To: harry.wentland@amd.com Cc: sunpeng.li@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com, airlied@linux.ie, daniel@ffwll.ch, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] drm/amd/display: Simplify bool comparison Date: Mon, 8 Feb 2021 18:29:28 +0800 Message-Id: <1612780168-83989-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warning: ./drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h:319:11-23: WARNING: Comparison to bool. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h b/drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h index ffd3769..316301f 100644 --- a/drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h +++ b/drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h @@ -309,9 +309,9 @@ static inline bool should_set_clock(bool safe_to_lower, int calc_clk, int cur_cl static inline bool should_update_pstate_support(bool safe_to_lower, bool calc_support, bool cur_support) { if (cur_support != calc_support) { - if (calc_support == true && safe_to_lower) + if (calc_support && safe_to_lower) return true; - else if (calc_support == false && !safe_to_lower) + else if (!calc_support && !safe_to_lower) return true; } -- 1.8.3.1