Patchwork [U-Boot] video: Use memset instead of loop

login
register
mail settings
Submitter Matthias Weisser
Date June 29, 2011, 11:57 a.m.
Message ID <1309348645-3597-1-git-send-email-weisserm@arcor.de>
Download mbox | patch
Permalink /patch/102571/
State Accepted
Commit 8370befc1968bdfb0b2423fe10a3cb2e66e8a197
Delegated to: Anatolij Gustschin
Headers show

Comments

Matthias Weisser - June 29, 2011, 11:57 a.m.
There is a optimized version of memset in u-boot available so use it instead
of the hand written loop version.

Signed-off-by: Matthias Weisser <weisserm@arcor.de>
---
 drivers/video/mb86r0xgdc.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
Anatolij Gustschin - July 4, 2011, 8:49 p.m.
On Wed, 29 Jun 2011 13:57:25 +0200
Matthias Weisser <weisserm@arcor.de> wrote:

> There is a optimized version of memset in u-boot available so use it instead
> of the hand written loop version.
> 
> Signed-off-by: Matthias Weisser <weisserm@arcor.de>
> ---
>  drivers/video/mb86r0xgdc.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)

applied to u-boot-video/master. Thanks!

Anatolij

Patch

diff --git a/drivers/video/mb86r0xgdc.c b/drivers/video/mb86r0xgdc.c
index 3bdc1db..5425c9d 100644
--- a/drivers/video/mb86r0xgdc.c
+++ b/drivers/video/mb86r0xgdc.c
@@ -77,8 +77,7 @@  static void dsp_init(struct mb86r0x_gdc_dsp *dsp, char *modestr,
 	}
 
 	/* Fill memory with white */
-	for (i = 0; i < var_mode.xres * var_mode.yres / 2; i++)
-		*videomem++ = 0xFFFFFFFF;
+	memset(videomem, 0xFF, var_mode.xres * var_mode.yres * 2);
 
 	mb86r0x.winSizeX = var_mode.xres;
 	mb86r0x.winSizeY = var_mode.yres;