Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp414752ybz; Wed, 22 Apr 2020 00:22:46 -0700 (PDT) X-Google-Smtp-Source: APiQypJHaBRYRl/YKUjyQ3+lw+Gtk9CYeJ75yJ10tT3I+sphaoX7gI0kwaCUgreuDEy8doXTCwJP X-Received: by 2002:a05:6402:22ed:: with SMTP id dn13mr21575845edb.212.1587540166434; Wed, 22 Apr 2020 00:22:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587540166; cv=none; d=google.com; s=arc-20160816; b=wor4VGQJiCJsNF5z4CwZEEqjyLqEDFGdHFGmruwf1vvOy8Xp4OaRDc3aLYtYyup5cy DaSU+No+DZmpQ+W4pGrTFnSHoX+KQBzWahuVqlYjUOmru/iR9/HinRLefnAsIuSD34XW VcmD3V6lMWEYxkeqwdsTjE1cx/YRLt8z7zChCm2q7J4ZElZOaeOkpmh4KrhPQDbryyoL Mri82KZ9PPZYG1L1VFkHLtNE+VHuKnSAvo7AB22PtcH/NDmS5M1oUUDFzyngJGmWrIkA DoI+kBzA4JEXxAegJ9NCg/qT1LJ5tLuMq4AWiFVCigjh5bAYzZKkk3RJWKaM6aSKCSm6 13Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=hdE5yesWXvg3331z7SaCHr76B+cP24YhBjLSBlduGn4=; b=VSKJtarVxuPiZZj60ZAyP4hy92+Az8TbS9xKzyiBDDsWRpLh3EaR/KpyxBLWbD0ZZl tPJAB7vqTaiJ8j4FYOk3Q7W0BSt5xraQsXZbrlZO3WoelwZ2ni6H1SNC28uZ5yvdE81e nfEjyY0BchgUdrvFr14IzNm8+/fXsR5UoGuGopaJpG7HTDW0l1GoYjld3sCe7eSH4YBl 5GYSMVG/gAVB20lreZUxRqSHEo9Ot+oHgXKc7/Hnva2brcaFNwy+zY6HRIlIm+iP09A8 z7CxCUMyjXeMuZK9zQLxiTP8FWIpdT/woAbiLJejBjtIpWfHmkHPndwq97SPE/fMVEZn npWA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e7si2940395edv.284.2020.04.22.00.22.23; Wed, 22 Apr 2020 00:22:46 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726527AbgDVHTp (ORCPT + 99 others); Wed, 22 Apr 2020 03:19:45 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:32874 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725811AbgDVHTp (ORCPT ); Wed, 22 Apr 2020 03:19:45 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 1D23384CEA046174019C; Wed, 22 Apr 2020 15:19:43 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Wed, 22 Apr 2020 15:19:34 +0800 From: Jason Yan To: , , , , , , CC: Jason Yan Subject: [PATCH] omapfb/dss: fix comparison to bool warning Date: Wed, 22 Apr 2020 15:19:03 +0800 Message-ID: <20200422071903.637-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warning: drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c:461:15-32: WARNING: Comparison to bool drivers/video/fbdev/omap2/omapfb/dss/dispc.c:891:5-35: WARNING: Comparison of 0/1 to bool variable Signed-off-by: Jason Yan --- drivers/video/fbdev/omap2/omapfb/dss/dispc.c | 2 +- drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dispc.c b/drivers/video/fbdev/omap2/omapfb/dss/dispc.c index 4a16798b2ecd..3bb951eb29c7 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dispc.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dispc.c @@ -888,7 +888,7 @@ static void dispc_ovl_set_color_mode(enum omap_plane plane, static void dispc_ovl_configure_burst_type(enum omap_plane plane, enum omap_dss_rotation_type rotation_type) { - if (dss_has_feature(FEAT_BURST_2D) == 0) + if (!dss_has_feature(FEAT_BURST_2D)) return; if (rotation_type == OMAP_DSS_ROT_TILER) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c index 7060ae56c062..ef659c89ba58 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c @@ -455,11 +455,9 @@ static void hdmi_disconnect(struct omap_dss_device *dssdev, static int hdmi_read_edid(struct omap_dss_device *dssdev, u8 *edid, int len) { - bool need_enable; + bool need_enable = !hdmi.core_enabled; int r; - need_enable = hdmi.core_enabled == false; - if (need_enable) { r = hdmi_core_enable(dssdev); if (r) -- 2.21.1