public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Fix some bugs in the EFI support
@ 2011-11-29 23:39 Gabe Black
  2011-12-02 21:28 ` Graeme Russ
  0 siblings, 1 reply; 7+ messages in thread
From: Gabe Black @ 2011-11-29 23:39 UTC (permalink / raw)
  To: u-boot

The ALLOC_CACHE_ALIGN_BUFFER macro allocates a pointer to a buffer, and the
address of the pointer and not the buffer was being passed to a function
that expected the other. This change fixes a few places that bug crops up.
Also, it provides a default definition for the CONFIG_SYS_CACHELINE_SIZE
macro to avoid compiler errors.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
---
 disk/part_efi.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/disk/part_efi.c b/disk/part_efi.c
index e7f2714..c94d808 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -37,6 +37,10 @@
 #include "part_efi.h"
 #include <linux/ctype.h>
 
+#ifndef CONFIG_SYS_CACHELINE_SIZE
+#define CONFIG_SYS_CACHELINE_SIZE __BIGGEST_ALIGNMENT__
+#endif
+
 #if defined(CONFIG_CMD_IDE) || \
     defined(CONFIG_CMD_MG_DISK) || \
     defined(CONFIG_CMD_SATA) || \
@@ -130,7 +134,7 @@ void print_part_efi(block_dev_desc_t * dev_desc)
 	}
 	/* This function validates AND fills in the GPT header and PTE */
 	if (is_gpt_valid(dev_desc, GPT_PRIMARY_PARTITION_TABLE_LBA,
-			 &(gpt_head), &gpt_pte) != 1) {
+			 gpt_head, &gpt_pte) != 1) {
 		printf("%s: *** ERROR: Invalid GPT ***\n", __func__);
 		return;
 	}
@@ -169,7 +173,7 @@ int get_partition_info_efi(block_dev_desc_t * dev_desc, int part,
 
 	/* This function validates AND fills in the GPT header and PTE */
 	if (is_gpt_valid(dev_desc, GPT_PRIMARY_PARTITION_TABLE_LBA,
-			&(gpt_head), &gpt_pte) != 1) {
+			gpt_head, &gpt_pte) != 1) {
 		printf("%s: *** ERROR: Invalid GPT ***\n", __func__);
 		return -1;
 	}
-- 
1.7.3.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-12-09 23:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-29 23:39 [U-Boot] [PATCH] Fix some bugs in the EFI support Gabe Black
2011-12-02 21:28 ` Graeme Russ
2011-12-02 21:59   ` Simon Glass
2011-12-06 18:50     ` Anton Staaf
2011-12-06 19:22       ` Anatolij Gustschin
2011-12-06 19:35       ` Wolfgang Denk
2011-12-09 23:20         ` Anton Staaf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox