[U-Boot] [PATCH 10/13] lcd: various cleanups

Simon Glass sjg at chromium.org
Sat Jan 31 01:24:53 CET 2015


On 29 January 2015 at 04:21, Nikita Kiryanov <nikita at compulab.co.il> wrote:
> This cleanup mostly focuses on removing unnecessary whitespace and comments
> which are superfluous and/or do not conform to the coding style.
>
> Signed-off-by: Nikita Kiryanov <nikita at compulab.co.il>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Anatolij Gustschin <agust at denx.de>
> ---
>  common/lcd.c  |  90 +++++++++------------------------------------------
>  include/lcd.h | 102 ++++++++++++++++++++--------------------------------------
>  2 files changed, 49 insertions(+), 143 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>

Optional comment below.

>
> diff --git a/common/lcd.c b/common/lcd.c
> index 7a51923..06eec45 100644
> --- a/common/lcd.c
> +++ b/common/lcd.c

> @@ -379,17 +330,14 @@ __weak void lcd_logo_set_cmap(void)
>  void bitmap_plot(int x, int y)
>  {
>         ushort i, j;
> -       uchar *bmap;
> -       uchar *fb;
> -       ushort *fb16;
> +       uchar *bmap = &bmp_logo_bitmap[0];
>         unsigned bpix = NBITS(panel_info.vl_bpix);
> +       uchar *fb = (uchar *)(lcd_base + y * lcd_line_length + x * bpix / 8);

I don't thing it's better to attach these to the declaration. Personal
preference though, it's up to you.

> +       ushort *fb16;
>
>         debug("Logo: width %d  height %d  colors %d\n",
>               BMP_LOGO_WIDTH, BMP_LOGO_HEIGHT, BMP_LOGO_COLORS);
>
> -       bmap = &bmp_logo_bitmap[0];
> -       fb   = (uchar *)(lcd_base + y * lcd_line_length + x * bpix / 8);
> -
>         if (bpix < 12) {
>                 WATCHDOG_RESET();
>                 lcd_logo_set_cmap();

Regards,
Simon


More information about the U-Boot mailing list