[flashrom] [PATCH] uintptr_t-ify map_flash_region functions.

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Wed Jul 17 23:47:33 CEST 2013


Am 17.07.2013 15:58 schrieb Stefan Tauner:
> unsigned long is not the right type for manipulating pointer values.
> Since C99 there are suitable unsigned and signed types available, namely
> uintptr_t and intptr_t respectively.
>
> Use them in functions assigned to programmers' map_flash_region fields and
> their callers where applicable.
>
> This patch also changes the display width of all associated address values in
> physmap.c to 16/8 hex characters depending on the actual size by
> introducing a macro PRIxPTR_WIDTH and exploiting printf's * field width
> specifier.
>
> Signed-off-by: Stefan Tauner <stefan.tauner at student.tuwien.ac.at>
> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
> ---
>
> Can you please verify that this is what you want?

Yes. Exactly.

> I put the _WIDTH macro in flash.h now for obvious reasons.

Thanks!

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/





More information about the flashrom mailing list