From patchwork Mon Oct 29 23:34:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kim Phillips X-Patchwork-Id: 195149 X-Patchwork-Delegate: trini@ti.com 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 16B242C008C for ; Tue, 30 Oct 2012 10:38:15 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4C4CB4A117; Tue, 30 Oct 2012 00:38:07 +0100 (CET) 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 1OfA2WHJj2It; Tue, 30 Oct 2012 00:38:07 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AC7E84A08D; Tue, 30 Oct 2012 00:37:21 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 64D654A033 for ; Tue, 30 Oct 2012 00:37:17 +0100 (CET) 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 So-S+mLcDe+n for ; Tue, 30 Oct 2012 00:37:16 +0100 (CET) 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 am1outboundpool.messaging.microsoft.com (am1ehsobe006.messaging.microsoft.com [213.199.154.209]) by theia.denx.de (Postfix) with ESMTPS id 2F9094A037 for ; Tue, 30 Oct 2012 00:37:16 +0100 (CET) Received: from mail49-am1-R.bigfish.com (10.3.201.235) by AM1EHSOBE003.bigfish.com (10.3.204.23) with Microsoft SMTP Server id 14.1.225.23; Mon, 29 Oct 2012 23:37:12 +0000 Received: from mail49-am1 (localhost [127.0.0.1]) by mail49-am1-R.bigfish.com (Postfix) with ESMTP id DCDF7601F6 for ; Mon, 29 Oct 2012 23:37:11 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1202h1d1ah1d2ahzz8275bhz2dh2a8h668h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h1155h) Received: from mail49-am1 (localhost.localdomain [127.0.0.1]) by mail49-am1 (MessageSwitch) id 135155383095777_26510; Mon, 29 Oct 2012 23:37:10 +0000 (UTC) Received: from AM1EHSMHS008.bigfish.com (unknown [10.3.201.254]) by mail49-am1.bigfish.com (Postfix) with ESMTP id 15498E004A for ; Mon, 29 Oct 2012 23:37:10 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by AM1EHSMHS008.bigfish.com (10.3.207.108) with Microsoft SMTP Server (TLS) id 14.1.225.23; Mon, 29 Oct 2012 23:37:10 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server (TLS) id 14.2.318.3; Mon, 29 Oct 2012 23:37:07 +0000 Received: from x9.am.freescale.net (x9.am.freescale.net [10.82.120.9]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id q9TNb5ol024985 for ; Mon, 29 Oct 2012 16:37:07 -0700 From: Kim Phillips To: Date: Mon, 29 Oct 2012 18:34:30 -0500 Message-ID: <1351553687-12469-9-git-send-email-kim.phillips@freescale.com> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1351553687-12469-1-git-send-email-kim.phillips@freescale.com> References: <1351553687-12469-1-git-send-email-kim.phillips@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com Subject: [U-Boot] [PATCH v2 08/25] include/image.h: sparse fixes X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de include/image.h:378:1: warning: cast to restricted __be32 include/image.h:381:1: warning: cast to restricted __be32 include/image.h:382:1: warning: cast to restricted __be32 include/image.h:383:1: warning: cast to restricted __be32 fix by annotating image header integers big endian. Signed-off-by: Kim Phillips --- v2: no changes include/image.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/include/image.h b/include/image.h index 4e5863f..0a895f2 100644 --- a/include/image.h +++ b/include/image.h @@ -34,6 +34,7 @@ #define __IMAGE_H__ #include "compiler.h" +#include #ifdef USE_HOSTCC @@ -183,13 +184,13 @@ * all data in network byte order (aka natural aka bigendian). */ typedef struct image_header { - uint32_t ih_magic; /* Image Header Magic Number */ - uint32_t ih_hcrc; /* Image Header CRC Checksum */ - uint32_t ih_time; /* Image Creation Timestamp */ - uint32_t ih_size; /* Image Data Size */ - uint32_t ih_load; /* Data Load Address */ - uint32_t ih_ep; /* Entry Point Address */ - uint32_t ih_dcrc; /* Image Data CRC Checksum */ + __be32 ih_magic; /* Image Header Magic Number */ + __be32 ih_hcrc; /* Image Header CRC Checksum */ + __be32 ih_time; /* Image Creation Timestamp */ + __be32 ih_size; /* Image Data Size */ + __be32 ih_load; /* Data Load Address */ + __be32 ih_ep; /* Entry Point Address */ + __be32 ih_dcrc; /* Image Data CRC Checksum */ uint8_t ih_os; /* Operating System */ uint8_t ih_arch; /* CPU architecture */ uint8_t ih_type; /* Image Type */