From patchwork Mon Sep 26 02:06:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 116345 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 ADE50B6F7C for ; Mon, 26 Sep 2011 12:06:54 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E543D2826D; Mon, 26 Sep 2011 04:06: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 JzWbClaEJE+l; Mon, 26 Sep 2011 04:06:51 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3AED128265; Mon, 26 Sep 2011 04:06:49 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8D40828265 for ; Mon, 26 Sep 2011 04:06:47 +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 fMyzMy4owYum for ; Mon, 26 Sep 2011 04:06:46 +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-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by theia.denx.de (Postfix) with ESMTPS id BDDB328264 for ; Mon, 26 Sep 2011 04:06:45 +0200 (CEST) Received: by fxd18 with SMTP id 18so5053778fxd.3 for ; Sun, 25 Sep 2011 19:06:43 -0700 (PDT) Received: by 10.223.17.215 with SMTP id t23mr3182765faa.11.1317002803527; Sun, 25 Sep 2011 19:06:43 -0700 (PDT) Received: from mashiro.kolej.mff.cuni.cz (vasut.kolej.mff.cuni.cz. [78.128.198.52]) by mx.google.com with ESMTPS id v17sm18467040fai.18.2011.09.25.19.06.42 (version=SSLv3 cipher=OTHER); Sun, 25 Sep 2011 19:06:43 -0700 (PDT) From: Marek Vasut To: u-boot@lists.denx.de Date: Mon, 26 Sep 2011 04:06:38 +0200 Message-Id: <1317002798-27112-1-git-send-email-marek.vasut@gmail.com> X-Mailer: git-send-email 1.7.5.4 Subject: [U-Boot] [PATCH] GCC4.4: Squash multiple warnings due to strict aliasing 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 Signed-off-by: Marek Vasut --- arch/arm/include/asm/io.h | 30 ++++++++++++++++++------------ 1 files changed, 18 insertions(+), 12 deletions(-) diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index 1fbc531..61f4987 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h @@ -78,43 +78,49 @@ static inline phys_addr_t virt_to_phys(void * vaddr) extern inline void __raw_writesb(unsigned int addr, const void *data, int bytelen) { uint8_t *buf = (uint8_t *)data; - while(bytelen--) - __arch_putb(*buf++, addr); + int i; + for (i = 0; i < bytelen; i++) + __arch_putb(buf[i], addr); } extern inline void __raw_writesw(unsigned int addr, const void *data, int wordlen) { uint16_t *buf = (uint16_t *)data; - while(wordlen--) - __arch_putw(*buf++, addr); + int i; + for (i = 0; i < wordlen; i++) + __arch_putw(buf[i], addr); } extern inline void __raw_writesl(unsigned int addr, const void *data, int longlen) { uint32_t *buf = (uint32_t *)data; - while(longlen--) - __arch_putl(*buf++, addr); + int i; + for (i = 0; i < longlen; i++) + __arch_putl(buf[i], addr); } extern inline void __raw_readsb(unsigned int addr, void *data, int bytelen) { uint8_t *buf = (uint8_t *)data; - while(bytelen--) - *buf++ = __arch_getb(addr); + int i; + for (i = 0; i < bytelen; i++) + buf[i] = __arch_getb(addr); } extern inline void __raw_readsw(unsigned int addr, void *data, int wordlen) { uint16_t *buf = (uint16_t *)data; - while(wordlen--) - *buf++ = __arch_getw(addr); + int i; + for (i = 0; i < wordlen; i++) + buf[i] = __arch_getw(addr); } extern inline void __raw_readsl(unsigned int addr, void *data, int longlen) { uint32_t *buf = (uint32_t *)data; - while(longlen--) - *buf++ = __arch_getl(addr); + int i; + for (i = 0; i < longlen; i++) + buf[i] = __arch_getl(addr); } #define __raw_writeb(v,a) __arch_putb(v,a)