From patchwork Mon May 10 12:16:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 433099 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp2784122jao; Mon, 10 May 2021 05:16:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFfXGdxddIL0fbE1g2Gof6qu1f91J4ZP+nPBj5SL8OFn9g1WQCo+jTi+JCW/3c7FZDoXR0 X-Received: by 2002:a17:90a:5806:: with SMTP id h6mr27213482pji.14.1620648999701; Mon, 10 May 2021 05:16:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620648999; cv=none; d=google.com; s=arc-20160816; b=Iy6lHc22j8qFj/MnxsovZxIUgS4AWepCza9YZLBT18ESXHygiK5f0N32CYqmvZXduL ao/IQh/KFZE6fnZOvwq7bS4geDXzPonBfYGsGpHyvPFaiyvjbXEljg8oqfAl3+sajQmd xsNJcbCqqaxg8X3kLXcSjzY2/Y1rVfFrpBjwCGvHS1lQD0fScLtKC1H2r9czhjoIx9iF ukyCSDhncALzFccPzt2yGDqUSVFYWET7NBgFro40PS578uFUj+9bFOgdaRGiMWeXD8vq x8aggC61a9bDOmLI/4+VAjU4N79Rg3hnLfmbcBomhhJreh1kChbUPEvswdVpyGPd/PiQ Wnww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:delivered-to; bh=WLAJ8fsFIgL6rlgA+8MxFWNOJmpl904vGz7Y7NRgaHs=; b=Pg8SPtZI4KyB13wBYIyD1LAVD1CEYkKU1R+rktTlcNWShJ7uAXguSxFbsSkLvRYMyl 6wTYw4XVlMPZt2Fq0+MLuxvmrQC3/vXx8V5mW1ICxEdaHLOSjkC+k+6SLUy4Hw1N+Pok dCWDODZvXP5wl3To1XGVBqnh2J3b2WAvtvlGVcbNPDLb1HE4D3ZUYqab+aiTwjrV7Xxl PFgkMHnNi96izLiGpBjldCF/8fmNkbbr8lo7NqM4Qap0TWDiFbtkz80zNBSPG8M/ucR/ QNTfsugZZ547Vekxw1cNF+k76rZu5IEsxHda8Rrft5dB7j80iQh6jq2wLiPOpihGGsJR NTdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id 92si20408218plc.268.2021.05.10.05.16.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 May 2021 05:16:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 661D86E46B; Mon, 10 May 2021 12:16:37 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from szxga07-in.huawei.com (szxga07-in.huawei.com [45.249.212.35]) by gabe.freedesktop.org (Postfix) with ESMTPS id 13AD46E46B; Mon, 10 May 2021 12:16:36 +0000 (UTC) Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4Ff0Mk3xNfzCrB0; Mon, 10 May 2021 20:13:54 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.72) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.498.0; Mon, 10 May 2021 20:16:26 +0800 From: Zhen Lei To: Harry Wentland , Leo Li , "Alex Deucher" , =?utf-8?q?Christian_K?= =?utf-8?b?w7ZuaWc=?= , David Airlie , Daniel Vetter , amd-gfx , dri-devel Subject: [PATCH 1/1] drm/amd/display: Delete several unneeded bool conversions Date: Mon, 10 May 2021 20:16:21 +0800 Message-ID: <20210510121621.3692-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.177.72] X-CFilter-Loop: Reflected X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhen Lei Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The result of an expression consisting of a single relational operator is already of the bool type and does not need to be evaluated explicitly. No functional change. Signed-off-by: Zhen Lei --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.26.0.106.g9fadedd diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c index 8dc3d1f7398422e..2feb051a200294a 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c @@ -482,7 +482,7 @@ bool dpp20_program_blnd_lut( next_mode = LUT_RAM_A; dpp20_power_on_blnd_lut(dpp_base, true); - dpp20_configure_blnd_lut(dpp_base, next_mode == LUT_RAM_A ? true:false); + dpp20_configure_blnd_lut(dpp_base, next_mode == LUT_RAM_A); if (next_mode == LUT_RAM_A) dpp20_program_blnd_luta_settings(dpp_base, params); @@ -893,7 +893,7 @@ bool dpp20_program_shaper( else next_mode = LUT_RAM_A; - dpp20_configure_shaper_lut(dpp_base, next_mode == LUT_RAM_A ? true:false); + dpp20_configure_shaper_lut(dpp_base, next_mode == LUT_RAM_A); if (next_mode == LUT_RAM_A) dpp20_program_shaper_luta_settings(dpp_base, params); diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c index 910c17fd4278932..950c9bfd53de516 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c @@ -874,7 +874,7 @@ bool mpc3_program_shaper( else next_mode = LUT_RAM_A; - mpc3_configure_shaper_lut(mpc, next_mode == LUT_RAM_A ? true:false, rmu_idx); + mpc3_configure_shaper_lut(mpc, next_mode == LUT_RAM_A, rmu_idx); if (next_mode == LUT_RAM_A) mpc3_program_shaper_luta_settings(mpc, params, rmu_idx);