From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Mon, 19 Nov 2012 12:39:43 -0700 Subject: [U-Boot] [PATCH v4 4/7] gpt: The leXX_to_int() calls replaced with ones defined at In-Reply-To: <1352458087-20462-1-git-send-email-p.wilczek@samsung.com> References: <1352452938-2375-1-git-send-email-p.wilczek@samsung.com> <1352458087-20462-1-git-send-email-p.wilczek@samsung.com> Message-ID: <50AA8AFF.6010103@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 11/09/2012 03:48 AM, Piotr Wilczek wrote: > Custom definitions of le_XX_to_int functions have been replaced with > standard ones, defined at > > Replacement of several GPT related structures members with ones > indicating its endianness and proper size. > diff --git a/disk/part_efi.c b/disk/part_efi.c > printf("%3d\t0x%08llx\t0x%08llx\t\"%s\"\n", (i + 1), > - le64_to_int(gpt_pte[i].starting_lba), > - le64_to_int(gpt_pte[i].ending_lba), > + (u64) le64_to_cpu(gpt_pte[i].starting_lba), > + (u64) le64_to_cpu(gpt_pte[i].ending_lba), I don't think there should be a space after the cast. Why doesn't le64_to_cpu() return a u64? The same comments apply to many diffs in this patch. > - if (calc_crc32 != le32_to_int(crc32_backup)) { > + if (calc_crc32 != le32_to_cpu(crc32_backup)) { > printf("GUID Partition Table Header CRC is wrong:" > - "0x%08lX != 0x%08lX\n", > - le32_to_int(crc32_backup), calc_crc32); > + "0x%x != 0x%x\n", > + (u32) le32_to_cpu(crc32_backup), calc_crc32); Indentation looks wrong (some lines use spaces, some TABs). > - if (calc_crc32 != le32_to_int(pgpt_head->partition_entry_array_crc32)) { > + if (calc_crc32 != le32_to_cpu(pgpt_head->partition_entry_array_crc32)) { > printf("GUID Partition Table Entry Array CRC is wrong:" > - "0x%08lX != 0x%08lX\n", > - le32_to_int(pgpt_head->partition_entry_array_crc32), > + "0x%x != 0x%x\n", > + (u32)le32_to_cpu(pgpt_head->partition_entry_array_crc32), Same here. Aside from that, briefly, Reviewed-by: Stephen Warren