From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] video: ipu: simplify if else code
Date: Tue, 24 Nov 2015 10:55:33 +0100 [thread overview]
Message-ID: <56543415.8040001@denx.de> (raw)
In-Reply-To: <1448355263-545-4-git-send-email-Peng.Fan@freescale.com>
On 24/11/2015 09:54, Peng Fan wrote:
> Simplify if/else code, since if channel equals to MEM_BG_SYNC or
> MEM_FG_SYNC, we have value 5 for 'dc_chan'.
>
> Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
> Cc: Anatolij Gustschin <agust@denx.de>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
> drivers/video/ipu_disp.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/video/ipu_disp.c b/drivers/video/ipu_disp.c
> index 4faeafb..7a87478 100644
> --- a/drivers/video/ipu_disp.c
> +++ b/drivers/video/ipu_disp.c
> @@ -611,11 +611,9 @@ void ipu_dp_dc_enable(ipu_channel_t channel)
> uint32_t reg;
> uint32_t dc_chan;
>
> - if (channel == MEM_FG_SYNC)
> - dc_chan = 5;
> if (channel == MEM_DC_SYNC)
> dc_chan = 1;
> - else if (channel == MEM_BG_SYNC)
> + else if ((channel == MEM_BG_SYNC) || (channel == MEM_FG_SYNC))
> dc_chan = 5;
> else
> return;
>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
next prev parent reply other threads:[~2015-11-24 9:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-24 8:54 [U-Boot] [PATCH] common: bootm: check return value of strict_strtoul Peng Fan
2015-11-24 8:54 ` [U-Boot] [RFC] common: cli_hush: avoid dead code Peng Fan
2015-11-24 19:04 ` Simon Glass
2015-12-06 22:06 ` [U-Boot] [U-Boot,RFC] " Tom Rini
2015-11-24 8:54 ` [U-Boot] [PATCH] common: image-fdt: correct fdt_blob for IMAGE_FORMAT_LEGACY Peng Fan
2015-11-24 19:04 ` Simon Glass
2015-11-25 1:12 ` Peng Fan
2015-12-01 20:01 ` Simon Glass
2015-12-06 22:06 ` [U-Boot] " Tom Rini
2015-11-24 8:54 ` [U-Boot] [PATCH] video: ipu: simplify if else code Peng Fan
2015-11-24 9:55 ` Stefano Babic [this message]
2015-11-24 19:04 ` [U-Boot] [PATCH] common: bootm: check return value of strict_strtoul Simon Glass
2015-12-06 22:05 ` [U-Boot] " Tom Rini
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=56543415.8040001@denx.de \
--to=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
/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