From patchwork Wed Jun 29 11:57:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Weisser X-Patchwork-Id: 102571 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3ECCBB6F5C for ; Wed, 29 Jun 2011 21:57:53 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2C764280EF; Wed, 29 Jun 2011 13:57:51 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UHCU3I7FSR-5; Wed, 29 Jun 2011 13:57:51 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D7968280E1; Wed, 29 Jun 2011 13:57:48 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4EAF3280E1 for ; Wed, 29 Jun 2011 13:57:46 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ILmhaGNfyJ5H for ; Wed, 29 Jun 2011 13:57:45 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-in-16.arcor-online.net (mail-in-16.arcor-online.net [151.189.21.56]) by theia.denx.de (Postfix) with ESMTPS id 7604C280DF for ; Wed, 29 Jun 2011 13:57:44 +0200 (CEST) Received: from mail-in-16-z2.arcor-online.net (mail-in-16-z2.arcor-online.net [151.189.8.33]) by mx.arcor.de (Postfix) with ESMTP id 42B308B61; Wed, 29 Jun 2011 13:57:44 +0200 (CEST) Received: from mail-in-15.arcor-online.net (mail-in-15.arcor-online.net [151.189.21.55]) by mail-in-16-z2.arcor-online.net (Postfix) with ESMTP id 353583FE121; Wed, 29 Jun 2011 13:57:44 +0200 (CEST) Received: from localhost.localdomain (unknown [212.87.136.142]) (Authenticated sender: weisserm@arcor.de) by mail-in-15.arcor-online.net (Postfix) with ESMTPA id A3D531AB63E; Wed, 29 Jun 2011 13:57:43 +0200 (CEST) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-15.arcor-online.net A3D531AB63E From: Matthias Weisser To: u-boot@lists.denx.de Date: Wed, 29 Jun 2011 13:57:25 +0200 Message-Id: <1309348645-3597-1-git-send-email-weisserm@arcor.de> X-Mailer: git-send-email 1.7.0.4 Subject: [U-Boot] [PATCH] video: Use memset instead of loop X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 --- drivers/video/mb86r0xgdc.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) 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;