From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Fri, 13 Apr 2007 12:22:57 -0500 Subject: [U-Boot-Users] [PATCH] Fix use of "void *" for block dev read/write buffer pointers In-Reply-To: <200704130845.32830.d.peter@mpl.ch> References: <528646bc0704121327m43e7d52dvdc831fd8289daa4c@mail.gmail.com> <200704130756.11280.sr@denx.de> <200704130845.32830.d.peter@mpl.ch> Message-ID: <461FBC71.2030300@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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