Print the value of offset in hex. Hex values are easier to debug.
Signed-off-by: FENG Yu Ning fengyuning1984@gmail.com
Index: trunk/ichspi.c =================================================================== --- trunk/ichspi.c (revision 472) +++ trunk/ichspi.c (working copy) @@ -628,7 +628,7 @@ uint32_t remaining = flash->page_size; int a;
- printf_debug("ich_spi_read_page: offset=%d, number=%d, buf=%p\n", + printf_debug("ich_spi_read_page: offset=0x%07x, number=%d, buf=0x%p\n", offset, page_size, buf);
for (a = 0; a < page_size; a += maxdata) {
On 07.05.2009 19:02, fengyuning1984@gmail.com wrote:
Print the value of offset in hex. Hex values are easier to debug.
Signed-off-by: FENG Yu Ning fengyuning1984@gmail.com
Index: trunk/ichspi.c
--- trunk/ichspi.c (revision 472) +++ trunk/ichspi.c (working copy) @@ -628,7 +628,7 @@ uint32_t remaining = flash->page_size; int a;
- printf_debug("ich_spi_read_page: offset=%d, number=%d, buf=%p\n",
- printf_debug("ich_spi_read_page: offset=0x%07x, number=%d, buf=0x%p\n",
AFAIK %p already prints the 0x before the hex value, so buf=%p would be preferable.
offset, page_size, buf);
for (a = 0; a < page_size; a += maxdata) {
Other than that, I think the patch improves readability and is Acked-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Do you have commit access or do you want me to commit with the small 0x change?
Regards, Carl-Daniel
Carl-Daniel Hailfinger wrote:
AFAIK %p already prints the 0x before the hex value, so buf=%p would be preferable.
Yes, I made a mistake. Maybe the C library on his system is reponsible for the no "0x" output?
http://www.coreboot.org/pipermail/coreboot/2009-May/047736.html
Other than that, I think the patch improves readability and is Acked-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Thank you.
Do you have commit access or do you want me to commit with the small 0x change?
No, I don't have commit access. Please commit for me. Thanks.
yu ning