* [PATCH] drm/omap: remove unneeded conversions to bool
@ 2016-07-01 14:27 Andrew F. Davis
2016-08-11 10:03 ` Tomi Valkeinen
0 siblings, 1 reply; 2+ messages in thread
From: Andrew F. Davis @ 2016-07-01 14:27 UTC (permalink / raw)
To: David Airlie, Tomi Valkeinen; +Cc: dri-devel, linux-kernel, Andrew F . Davis
Found with scripts/coccinelle/misc/boolconv.cocci.
Signed-off-by: Andrew F. Davis <afd@ti.com>
---
drivers/gpu/drm/omapdrm/dss/dispc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c
index f83608b..495094b 100644
--- a/drivers/gpu/drm/omapdrm/dss/dispc.c
+++ b/drivers/gpu/drm/omapdrm/dss/dispc.c
@@ -1655,7 +1655,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;
@@ -3086,9 +3086,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.9.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/omap: remove unneeded conversions to bool
2016-07-01 14:27 [PATCH] drm/omap: remove unneeded conversions to bool Andrew F. Davis
@ 2016-08-11 10:03 ` Tomi Valkeinen
0 siblings, 0 replies; 2+ messages in thread
From: Tomi Valkeinen @ 2016-08-11 10:03 UTC (permalink / raw)
To: Andrew F. Davis; +Cc: David Airlie, dri-devel, linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 1326 bytes --]
On 01/07/16 17:27, Andrew F. Davis wrote:
> Found with scripts/coccinelle/misc/boolconv.cocci.
>
> Signed-off-by: Andrew F. Davis <afd@ti.com>
> ---
> drivers/gpu/drm/omapdrm/dss/dispc.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c
> index f83608b..495094b 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dispc.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c
> @@ -1655,7 +1655,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;
> @@ -3086,9 +3086,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,
>
Thanks, queued for v4.9.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-11 10:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-01 14:27 [PATCH] drm/omap: remove unneeded conversions to bool Andrew F. Davis
2016-08-11 10:03 ` Tomi Valkeinen
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®