[coreboot] New patch to review for coreboot: 61ca34c cbfs: Revise debug messages.

Hung-Te Lin (hungte@chromium.org) gerrit at coreboot.org
Wed Feb 6 05:32:36 CET 2013


Hung-Te Lin (hungte at chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2294

-gerrit

commit 61ca34ca885b28bd22dad4e98776d55d0f7ca880
Author: Hung-Te Lin <hungte at chromium.org>
Date:   Wed Feb 6 12:25:27 2013 +0800

    cbfs: Revise debug messages.
    
    Some variables are using incorrect data type in debug messages.
    Also corrects a typo (extra 'x').
    
    Change-Id: Ia3014ea018f8c1e4733c54a7d9ee196d0437cfbb
    Signed-off-by: Hung-Te Lin <hungte at chromium.org>
---
 src/lib/cbfs.c      | 6 +++---
 src/lib/cbfs_core.c | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c
index 4702f1e..bfdab6c 100644
--- a/src/lib/cbfs.c
+++ b/src/lib/cbfs.c
@@ -177,8 +177,8 @@ void *cbfs_simple_buffer_map(struct cbfs_simple_buffer *buffer,
 			     struct cbfs_media *media,
 			     size_t offset, size_t count) {
 	void *address = buffer->buffer + buffer->allocated;;
-	DEBUG("simple_buffer_map(offset=%d, count=%d): "
-	      "allocated=%d, size=%d, last_allocate=%d\n",
+	DEBUG("simple_buffer_map(offset=%zd, count=%zd): "
+	      "allocated=%zd, size=%zd, last_allocate=%zd\n",
 	    offset, count, buffer->allocated, buffer->size,
 	    buffer->last_allocate);
 	if (buffer->allocated + count >= buffer->size)
@@ -198,7 +198,7 @@ void *cbfs_simple_buffer_unmap(struct cbfs_simple_buffer *buffer,
 	// TODO Add simple buffer management so we can free more than last
 	// allocated one.
 	DEBUG("simple_buffer_unmap(address=0x%p): "
-	      "allocated=%d, size=%d, last_allocate=%d\n",
+	      "allocated=%zd, size=%zd, last_allocate=%zd\n",
 	    address, buffer->allocated, buffer->size,
 	    buffer->last_allocate);
 	if ((buffer->buffer + buffer->allocated - buffer->last_allocate) ==
diff --git a/src/lib/cbfs_core.c b/src/lib/cbfs_core.c
index 6e4f489..42b8c09 100644
--- a/src/lib/cbfs_core.c
+++ b/src/lib/cbfs_core.c
@@ -132,7 +132,7 @@ struct cbfs_file *cbfs_get_file(struct cbfs_media *media, const char *name)
 			uint32_t new_align = align;
 			if (offset % align)
 				new_align += align - (offset % align);
-			ERROR("ERROR: No file header found at 0x%xx - "
+			ERROR("ERROR: No file header found at 0x%x - "
 			      "try next aligned address: 0x%x.\n", offset,
 			      offset + new_align);
 			offset += new_align;



More information about the coreboot mailing list