linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] omapfb/dss: fix comparison to bool warning
@ 2020-04-22  7:19 ` Jason Yan
  2020-04-22  7:51   ` Tomi Valkeinen
  2020-06-01 13:25   ` Bartlomiej Zolnierkiewicz
  0 siblings, 2 replies; 3+ messages in thread
From: Jason Yan @ 2020-04-22  7:19 UTC (permalink / raw)
  To: b.zolnierkie, afd, tomi.valkeinen, linux-omap, linux-fbdev,
	dri-devel, linux-kernel
  Cc: Jason Yan

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] omapfb/dss: fix comparison to bool warning
  2020-04-22  7:19 ` [PATCH] omapfb/dss: fix comparison to bool warning Jason Yan
@ 2020-04-22  7:51   ` Tomi Valkeinen
  2020-06-01 13:25   ` Bartlomiej Zolnierkiewicz
  1 sibling, 0 replies; 3+ messages in thread
From: Tomi Valkeinen @ 2020-04-22  7:51 UTC (permalink / raw)
  To: Jason Yan, b.zolnierkie, afd, linux-omap, linux-fbdev, dri-devel,
	linux-kernel

On 22/04/2020 10:19, Jason Yan wrote:
> 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(-)

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

  Tomi

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] omapfb/dss: fix comparison to bool warning
  2020-04-22  7:19 ` [PATCH] omapfb/dss: fix comparison to bool warning Jason Yan
  2020-04-22  7:51   ` Tomi Valkeinen
@ 2020-06-01 13:25   ` Bartlomiej Zolnierkiewicz
  1 sibling, 0 replies; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2020-06-01 13:25 UTC (permalink / raw)
  To: Jason Yan
  Cc: afd, tomi.valkeinen, linux-omap, linux-fbdev, dri-devel, linux-kernel


On 4/22/20 9:19 AM, Jason Yan wrote:
> 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>

Applied to drm-misc-next tree (patch should show up in v5.9), thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> ---
>  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)
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-01 13:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20200422072450eucas1p106befe0a06fe20557d7ea4297525878a@eucas1p1.samsung.com>
2020-04-22  7:19 ` [PATCH] omapfb/dss: fix comparison to bool warning Jason Yan
2020-04-22  7:51   ` Tomi Valkeinen
2020-06-01 13:25   ` Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).