From patchwork Wed Aug 3 19:34:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 655582 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3s4NcT4Cqkz9sxR for ; Thu, 4 Aug 2016 05:36:57 +1000 (AEST) Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3s4NcT3SzlzDqYY for ; Thu, 4 Aug 2016 05:36:57 +1000 (AEST) X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3s4NZ45fbyzDqS6 for ; Thu, 4 Aug 2016 05:34:52 +1000 (AEST) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8EAE7636E4; Wed, 3 Aug 2016 19:34:50 +0000 (UTC) Received: from thh440s.redhat.com (ovpn-116-62.ams2.redhat.com [10.36.116.62]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u73JYiKM028877; Wed, 3 Aug 2016 15:34:49 -0400 From: Thomas Huth To: slof@lists.ozlabs.org Date: Wed, 3 Aug 2016 21:34:43 +0200 Message-Id: <1470252884-16602-4-git-send-email-thuth@redhat.com> In-Reply-To: <1470252884-16602-1-git-send-email-thuth@redhat.com> References: <1470252884-16602-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 03 Aug 2016 19:34:50 +0000 (UTC) Subject: [SLOF] [PATCH 3/4] Improve indentation in calculatecrc.h X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: areber@redhat.com MIME-Version: 1.0 Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" Since this header file is not included from assembler files anymore, we can remove the "#ifndef __ASSEMBLER__" here now and get rid of the unnecessary indentation in this file. Signed-off-by: Thomas Huth --- include/calculatecrc.h | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/include/calculatecrc.h b/include/calculatecrc.h index 434af46..26a90df 100644 --- a/include/calculatecrc.h +++ b/include/calculatecrc.h @@ -12,31 +12,29 @@ #ifndef CALCULATECRC_H #define CALCULATECRC_H - #define FLASHFS_DATADDR 0x18 // uint64_t position of pointer to data - #define FLASHFS_FILE_SIZE_ADDR 0x08 // uint64_t pos of total flashimage size value relative to data - #define FLASHFS_HEADER_SIZE_ADDR 0x08 // uint64_t position of total flash header size value +#define FLASHFS_DATADDR 0x18 // uint64_t position of pointer to data +#define FLASHFS_FILE_SIZE_ADDR 0x08 // uint64_t pos of total flashimage size value relative to data +#define FLASHFS_HEADER_SIZE_ADDR 0x08 // uint64_t position of total flash header size value - #ifndef __ASSEMBLER__ - #define FLASHFS_ROMADDR 0x00 // uint64_t position of pointer to next file - #define FLASHFS_HEADER_DATA_SIZE 0x68 // 104 bytes of total header data size - #define CRC_METHODE Ethernet_32 // define the CRc genarator (CRC 16 bit to 64 is supported) +#define FLASHFS_ROMADDR 0x00 // uint64_t position of pointer to next file +#define FLASHFS_HEADER_DATA_SIZE 0x68 // 104 bytes of total header data size +#define CRC_METHODE Ethernet_32 // define the CRC genarator (CRC 16 bit to 64 is supported) - //--- header format --------------------------------- - struct stH { - char magic[8]; // (generic!) headerfile - uint64_t flashlen; // dyn - char version[16]; // $DRIVER_INFO alignment! - char platform_name[32]; // (hardware) headerfile - char date[6]; // dyn (format -> JB) - char padding1[2]; // padding byte - char mdate[6]; // modify date - char padding2[2]; // padding byte - char platform_revision[4];// (hardware) headerfile - uint32_t padding; - uint64_t ui64CRC; // insert calculated CRC here - uint64_t ui64FileEnd; // = 0xFFFF FFFF FFFF FFFF - }; - #endif /* __ASSEMBLER__ */ +//--- header format --------------------------------- +struct stH { + char magic[8]; // (generic!) headerfile + uint64_t flashlen; // dyn + char version[16]; // $DRIVER_INFO alignment! + char platform_name[32]; // (hardware) headerfile + char date[6]; // dyn (format -> JB) + char padding1[2]; // padding byte + char mdate[6]; // modify date + char padding2[2]; // padding byte + char platform_revision[4];// (hardware) headerfile + uint32_t padding; + uint64_t ui64CRC; // insert calculated CRC here + uint64_t ui64FileEnd; // = 0xFFFF FFFF FFFF FFFF +}; #endif /* CALCULATECRC_H */