All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] omapfb/dss: remove unneeded conversions to bool
@ 2019-10-16 18:04   ` Andrew F. Davis
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew F. Davis @ 2019-10-16 18:04 UTC (permalink / raw)
  To: Jiri Kosina, Bartlomiej Zolnierkiewicz
  Cc: linux-fbdev, linux-kernel, Andrew F . Davis

Found with scripts/coccinelle/misc/boolconv.cocci.

Signed-off-by: Andrew F. Davis <afd@ti.com>
---
 drivers/video/fbdev/omap2/omapfb/dss/dispc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dispc.c b/drivers/video/fbdev/omap2/omapfb/dss/dispc.c
index 376ee5bc3ddc..ce37da85cc45 100644
--- a/drivers/video/fbdev/omap2/omapfb/dss/dispc.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/dispc.c
@@ -1635,7 +1635,7 @@ static void dispc_ovl_set_scaling_uv(enum omap_plane plane,
 {
 	int scale_x = out_width != orig_width;
 	int scale_y = out_height != orig_height;
-	bool chroma_upscale = plane != OMAP_DSS_WB ? true : false;
+	bool chroma_upscale = plane != OMAP_DSS_WB;
 
 	if (!dss_has_feature(FEAT_HANDLE_UV_SEPARATE))
 		return;
@@ -3100,9 +3100,9 @@ static bool _dispc_mgr_pclk_ok(enum omap_channel channel,
 		unsigned long pclk)
 {
 	if (dss_mgr_is_lcd(channel))
-		return pclk <= dispc.feat->max_lcd_pclk ? true : false;
+		return pclk <= dispc.feat->max_lcd_pclk;
 	else
-		return pclk <= dispc.feat->max_tv_pclk ? true : false;
+		return pclk <= dispc.feat->max_tv_pclk;
 }
 
 bool dispc_mgr_timings_ok(enum omap_channel channel,
-- 
2.17.1


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

* [PATCH] omapfb/dss: remove unneeded conversions to bool
@ 2019-10-16 18:04   ` Andrew F. Davis
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew F. Davis @ 2019-10-16 18:04 UTC (permalink / raw)
  To: Jiri Kosina, Bartlomiej Zolnierkiewicz
  Cc: linux-fbdev, linux-kernel, Andrew F . Davis

Found with scripts/coccinelle/misc/boolconv.cocci.

Signed-off-by: Andrew F. Davis <afd@ti.com>
---
 drivers/video/fbdev/omap2/omapfb/dss/dispc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dispc.c b/drivers/video/fbdev/omap2/omapfb/dss/dispc.c
index 376ee5bc3ddc..ce37da85cc45 100644
--- a/drivers/video/fbdev/omap2/omapfb/dss/dispc.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/dispc.c
@@ -1635,7 +1635,7 @@ static void dispc_ovl_set_scaling_uv(enum omap_plane plane,
 {
 	int scale_x = out_width != orig_width;
 	int scale_y = out_height != orig_height;
-	bool chroma_upscale = plane != OMAP_DSS_WB ? true : false;
+	bool chroma_upscale = plane != OMAP_DSS_WB;
 
 	if (!dss_has_feature(FEAT_HANDLE_UV_SEPARATE))
 		return;
@@ -3100,9 +3100,9 @@ static bool _dispc_mgr_pclk_ok(enum omap_channel channel,
 		unsigned long pclk)
 {
 	if (dss_mgr_is_lcd(channel))
-		return pclk <= dispc.feat->max_lcd_pclk ? true : false;
+		return pclk <= dispc.feat->max_lcd_pclk;
 	else
-		return pclk <= dispc.feat->max_tv_pclk ? true : false;
+		return pclk <= dispc.feat->max_tv_pclk;
 }
 
 bool dispc_mgr_timings_ok(enum omap_channel channel,
-- 
2.17.1

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

* Re: [PATCH] omapfb/dss: remove unneeded conversions to bool
  2019-10-16 18:04   ` Andrew F. Davis
@ 2020-01-03 12:40     ` Bartlomiej Zolnierkiewicz
  -1 siblings, 0 replies; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2020-01-03 12:40 UTC (permalink / raw)
  To: Andrew F. Davis; +Cc: Jiri Kosina, linux-fbdev, linux-kernel


On 10/16/19 8:04 PM, Andrew F. Davis wrote:
> Found with scripts/coccinelle/misc/boolconv.cocci.
> 
> Signed-off-by: Andrew F. Davis <afd@ti.com>

Thanks, patch queued for v5.6 (also sorry for the delay).

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

> ---
>  drivers/video/fbdev/omap2/omapfb/dss/dispc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dispc.c b/drivers/video/fbdev/omap2/omapfb/dss/dispc.c
> index 376ee5bc3ddc..ce37da85cc45 100644
> --- a/drivers/video/fbdev/omap2/omapfb/dss/dispc.c
> +++ b/drivers/video/fbdev/omap2/omapfb/dss/dispc.c
> @@ -1635,7 +1635,7 @@ static void dispc_ovl_set_scaling_uv(enum omap_plane plane,
>  {
>  	int scale_x = out_width != orig_width;
>  	int scale_y = out_height != orig_height;
> -	bool chroma_upscale = plane != OMAP_DSS_WB ? true : false;
> +	bool chroma_upscale = plane != OMAP_DSS_WB;
>  
>  	if (!dss_has_feature(FEAT_HANDLE_UV_SEPARATE))
>  		return;
> @@ -3100,9 +3100,9 @@ static bool _dispc_mgr_pclk_ok(enum omap_channel channel,
>  		unsigned long pclk)
>  {
>  	if (dss_mgr_is_lcd(channel))
> -		return pclk <= dispc.feat->max_lcd_pclk ? true : false;
> +		return pclk <= dispc.feat->max_lcd_pclk;
>  	else
> -		return pclk <= dispc.feat->max_tv_pclk ? true : false;
> +		return pclk <= dispc.feat->max_tv_pclk;
>  }
>  
>  bool dispc_mgr_timings_ok(enum omap_channel channel,

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

* Re: [PATCH] omapfb/dss: remove unneeded conversions to bool
@ 2020-01-03 12:40     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2020-01-03 12:40 UTC (permalink / raw)
  To: Andrew F. Davis; +Cc: Jiri Kosina, linux-fbdev, linux-kernel


On 10/16/19 8:04 PM, Andrew F. Davis wrote:
> Found with scripts/coccinelle/misc/boolconv.cocci.
> 
> Signed-off-by: Andrew F. Davis <afd@ti.com>

Thanks, patch queued for v5.6 (also sorry for the delay).

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

> ---
>  drivers/video/fbdev/omap2/omapfb/dss/dispc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dispc.c b/drivers/video/fbdev/omap2/omapfb/dss/dispc.c
> index 376ee5bc3ddc..ce37da85cc45 100644
> --- a/drivers/video/fbdev/omap2/omapfb/dss/dispc.c
> +++ b/drivers/video/fbdev/omap2/omapfb/dss/dispc.c
> @@ -1635,7 +1635,7 @@ static void dispc_ovl_set_scaling_uv(enum omap_plane plane,
>  {
>  	int scale_x = out_width != orig_width;
>  	int scale_y = out_height != orig_height;
> -	bool chroma_upscale = plane != OMAP_DSS_WB ? true : false;
> +	bool chroma_upscale = plane != OMAP_DSS_WB;
>  
>  	if (!dss_has_feature(FEAT_HANDLE_UV_SEPARATE))
>  		return;
> @@ -3100,9 +3100,9 @@ static bool _dispc_mgr_pclk_ok(enum omap_channel channel,
>  		unsigned long pclk)
>  {
>  	if (dss_mgr_is_lcd(channel))
> -		return pclk <= dispc.feat->max_lcd_pclk ? true : false;
> +		return pclk <= dispc.feat->max_lcd_pclk;
>  	else
> -		return pclk <= dispc.feat->max_tv_pclk ? true : false;
> +		return pclk <= dispc.feat->max_tv_pclk;
>  }
>  
>  bool dispc_mgr_timings_ok(enum omap_channel channel,

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

end of thread, other threads:[~2020-01-03 12:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20191016180541epcas5p4d85d004250e99c95c876da3c03d4d46e@epcas5p4.samsung.com>
2019-10-16 18:04 ` [PATCH] omapfb/dss: remove unneeded conversions to bool Andrew F. Davis
2019-10-16 18:04   ` Andrew F. Davis
2020-01-03 12:40   ` Bartlomiej Zolnierkiewicz
2020-01-03 12:40     ` Bartlomiej Zolnierkiewicz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.