From patchwork Sat Dec 17 12:58:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Gorski X-Patchwork-Id: 131995 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F2BE41007DB for ; Sun, 18 Dec 2011 00:00:53 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Rbtr9-0008NM-K0; Sat, 17 Dec 2011 12:59:15 +0000 Received: from mail-ey0-f177.google.com ([209.85.215.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Rbtqq-0008Ie-Cu for linux-mtd@lists.infradead.org; Sat, 17 Dec 2011 12:58:57 +0000 Received: by mail-ey0-f177.google.com with SMTP id k12so3598635eaa.36 for ; Sat, 17 Dec 2011 04:58:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=Z4ylx6tfBqkvZjo8jIEpfpDqW7MOWIpXcM0ArR1sZAY=; b=J3sT7HZLWdpyHtda/i3/cSf3Q8aLgUmWvTJ2cOUuNfS+DlNaqOmGwcC9udHzmMO4HK HVdTEtoNibIri2a5CTZRSdNkn/JSlvc8nUQnldhabcoHFUIRSOckjsNQAzr5QOH7Q0lT x8uyJixhzKwpqqljHKt+DOvq4NnkrXJ0AXbE4= Received: by 10.213.22.74 with SMTP id m10mr1204632ebb.40.1324126736040; Sat, 17 Dec 2011 04:58:56 -0800 (PST) Received: from shaker64.lan (dslb-088-073-137-229.pools.arcor-ip.net. [88.73.137.229]) by mx.google.com with ESMTPS id s16sm14739907eef.2.2011.12.17.04.58.54 (version=SSLv3 cipher=OTHER); Sat, 17 Dec 2011 04:58:55 -0800 (PST) From: Jonas Gorski To: linux-mtd@lists.infradead.org Subject: [PATCH 4/5] MIPS: BCM63XX: bcm963xx_tag.h: make crc fields integers Date: Sat, 17 Dec 2011 13:58:17 +0100 Message-Id: <1324126698-9919-5-git-send-email-jonas.gorski@gmail.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1324126698-9919-1-git-send-email-jonas.gorski@gmail.com> References: <1324126698-9919-1-git-send-email-jonas.gorski@gmail.com> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (jonas.gorski[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: linux-mips@linux-mips.org, Artem Bityutskiy , David Woodhouse , Florian Fainelli X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org All CRC32 fields are 32 bit integers, so define them as such to prevent unnecessary casts if we want to use them. Signed-off-by: Jonas Gorski --- I decided for __u32 against u32 so that user space applications can still use the header (like image creation utilities). arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h b/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h index ed72e6a..1e6b587 100644 --- a/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h +++ b/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h @@ -16,7 +16,6 @@ #define TAGINFO1_LEN 30 /* Length of vendor information field1 in tag */ #define FLASHLAYOUTVER_LEN 4 /* Length of Flash Layout Version String tag */ #define TAGINFO2_LEN 16 /* Length of vendor information field2 in tag */ -#define CRC_LEN 4 /* Length of CRC in bytes */ #define ALTTAGINFO_LEN 54 /* Alternate length for vendor information; Pirelli */ #define NUM_PIRELLI 2 @@ -77,19 +76,19 @@ struct bcm_tag { /* 192-195: Version flash layout */ char flash_layout_ver[FLASHLAYOUTVER_LEN]; /* 196-199: kernel+rootfs CRC32 */ - char fskernel_crc[CRC_LEN]; + __u32 fskernel_crc; /* 200-215: Unused except on Alice Gate where is is information */ char information2[TAGINFO2_LEN]; /* 216-219: CRC32 of image less imagetag (kernel for Alice Gate) */ - char image_crc[CRC_LEN]; + __u32 image_crc; /* 220-223: CRC32 of rootfs partition */ - char rootfs_crc[CRC_LEN]; + __u32 rootfs_crc; /* 224-227: CRC32 of kernel partition */ - char kernel_crc[CRC_LEN]; + __u32 kernel_crc; /* 228-235: Unused at present */ char reserved1[8]; /* 236-239: CRC32 of header excluding last 20 bytes */ - char header_crc[CRC_LEN]; + __u32 header_crc; /* 240-255: Unused at present */ char reserved2[16]; };