From: Jason Yan <yanaijie@huawei.com>
To: <b.zolnierkie@samsung.com>, <afd@ti.com>, <tomi.valkeinen@ti.com>,
<linux-omap@vger.kernel.org>, <linux-fbdev@vger.kernel.org>,
<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Cc: Jason Yan <yanaijie@huawei.com>
Subject: [PATCH] omapfb/dss: fix comparison to bool warning
Date: Wed, 22 Apr 2020 15:19:03 +0800 [thread overview]
Message-ID: <20200422071903.637-1-yanaijie@huawei.com> (raw)
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 <yanaijie@huawei.com>
---
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
next reply other threads:[~2020-04-22 7:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200422072450eucas1p106befe0a06fe20557d7ea4297525878a@eucas1p1.samsung.com>
2020-04-22 7:19 ` Jason Yan [this message]
2020-04-22 7:51 ` Tomi Valkeinen
2020-06-01 13:25 ` Bartlomiej Zolnierkiewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200422071903.637-1-yanaijie@huawei.com \
--to=yanaijie@huawei.com \
--cc=afd@ti.com \
--cc=b.zolnierkie@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®