Re: Freeing Volatile Pointer

2005-01-04 Thread Joerg Sonnenberger
On Tue, Jan 04, 2005 at 01:24:17PM +0530, Tejas Sumant wrote: > Is it available with FreeBSD4.10 release? > I am working on 4.10. > I couldnt find this __DEVOLATILE. __DEVOLATILE, __DECONST and the like haven't been MFCd. Joerg ___ freebsd-hackers@freeb

Re: Freeing Volatile Pointer

2005-01-03 Thread Tejas Sumant
> > Still better is using __DEVOLATILE from sys/cdefs.h, which does a cast to > uintptr_t first. This way, you even avoid this warning :) Is it available with FreeBSD4.10 release? I am working on 4.10. I couldnt find this __DEVOLATILE. OR Is it defined in any other file for 4.10 release? Tejas

Re: Freeing Volatile Pointer

2005-01-03 Thread Joerg Sonnenberger
On Mon, Jan 03, 2005 at 02:53:51PM +0200, Peter Pentchev wrote: >free((void *)host_mem_resp_ptr, M_DEVBUF) > > ...and you should be okay, unless you specifically pass -Wcast-qual to > the compiler. If you do, it will again give this warning, just because > you have explicitly asked it to :)

Re: Freeing Volatile Pointer

2005-01-03 Thread Peter Pentchev
On Mon, Jan 03, 2005 at 06:09:45PM +0530, Tejas Sumant wrote: > Hi, > > I have a volatile pointer declared in my device driver. > I am allocating memory using kernel malloc function. > > host_mem_resp_ptr = (volatile unsigned long *)malloc(sizeof(volatile > unsigned long), M_DEVBUF, M_NOWAIT); >

Freeing Volatile Pointer

2005-01-03 Thread Tejas Sumant
Hi, I have a volatile pointer declared in my device driver. I am allocating memory using kernel malloc function. host_mem_resp_ptr = (volatile unsigned long *)malloc(sizeof(volatile unsigned long), M_DEVBUF, M_NOWAIT); When I try to free it, I get following warning while compiling the driver. "