[coreboot] [PATCH] flashrom: print hex in ich_spi_read_page
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Tue May 12 23:47:50 CEST 2009
On 07.05.2009 19:02, fengyuning1984 at gmail.com wrote:
> Print the value of offset in hex. Hex values are easier to debug.
>
> Signed-off-by: FENG Yu Ning <fengyuning1984 at 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 at gmx.net>
Do you have commit access or do you want me to commit with the small 0x
change?
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
More information about the coreboot
mailing list