[U-Boot-Users] [PATCH] Fix use of "void *" for block dev read/write buffer pointers

Timur Tabi timur at freescale.com
Fri Apr 13 19:22:57 CEST 2007


Denis Peter wrote:

> My patch from April, 2nd, fixes this issue already. In my patch I decided to just 
> cast the pointer back to ulong *, since I don't know if it is a good idea to increment 
> a pointer to void *. 

It's not part of the normal C standard, but gcc allows you to perform pointer math on a 
void *.  It acts as is it were a "u8 *".

Remember, this code:

ulong *p;
p++;

Has the same effect as:

void *p
p += sizeof(ulong);

-- 
Timur Tabi
Linux Kernel Developer @ Freescale




More information about the U-Boot mailing list