Patchwork Change all type declaration to uintxx_t

login
register
about
Submitter Hamo
Date 2011-04-21 12:57:37
Message ID <BANLkTik2J19V5QBrXGUU3nFYWmEwhCVNYw@mail.gmail.com>
Download mbox | patch
Permalink /patch/2900/
State New
Headers show

Comments

Hamo - 2011-04-21 12:57:37
We mixed normal type declaration and uintxx_t in the definition of
CBFS headers before, this may confuse newbies who want to study CBFS
structure.


Signed-off-by: Yang Bai <hamo.by@gmail.com>
Peter Stuge - 2011-04-21 17:00:29
Thank you for the patch!

Hamo wrote:
> We mixed normal type declaration and uintxx_t in the definition of
> CBFS headers before, this may confuse newbies who want to study CBFS
> structure.
> 
> Signed-off-by: Yang Bai <hamo.by@gmail.com>

Acked-by: Peter Stuge <peter@stuge.se>

But I will wait a little to see if anyone else has comments, before I
commit this.


//Peter
Hamo - 2011-04-25 07:16:36
Ping...
Comments are welcome...


On Fri, Apr 22, 2011 at 1:00 AM, Peter Stuge <peter@stuge.se> wrote:
> Thank you for the patch!
>
> Hamo wrote:
>> We mixed normal type declaration and uintxx_t in the definition of
>> CBFS headers before, this may confuse newbies who want to study CBFS
>> structure.
>>
>> Signed-off-by: Yang Bai <hamo.by@gmail.com>
>
> Acked-by: Peter Stuge <peter@stuge.se>
>
> But I will wait a little to see if anyone else has comments, before I
> commit this.
>
>
> //Peter
>
> --
> coreboot mailing list: coreboot@coreboot.org
> http://www.coreboot.org/mailman/listinfo/coreboot
>

Patch

Index: util/cbfstool/cbfs.h
===================================================================
--- util/cbfstool/cbfs.h	(revision 6534)
+++ util/cbfstool/cbfs.h	(working copy)
@@ -37,11 +37,11 @@ 
 } __attribute__ ((packed));

 struct cbfs_stage {
-	unsigned int compression;
-	unsigned long long entry;
-	unsigned long long load;
-	unsigned int len;
-	unsigned int memlen;
+	uint32_t compression;
+	uint64_t entry;
+	uint64_t load;
+	uint32_t len;
+	uint32_t memlen;
 } __attribute__ ((packed));

 #define PAYLOAD_SEGMENT_CODE	0x45444F43
@@ -51,12 +51,12 @@ 
 #define PAYLOAD_SEGMENT_ENTRY	0x52544E45

 struct cbfs_payload_segment {
-	unsigned int type;
-	unsigned int compression;
-	unsigned int offset;
-	unsigned long long load_addr;
-	unsigned int len;
-	unsigned int mem_len;
+	uint32_t type;
+	uint32_t compression;
+	uint32_t offset;
+	uint64_t load_addr;
+	uint32_t len;
+	uint32_t mem_len;
 } __attribute__ ((packed));

 struct cbfs_payload {