Freeing Volatile Pointer
Tejas Sumant
tejas.sumant at gmail.com
Mon Jan 3 12:39:50 GMT 2005
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.
"warning: passing arg 1 of free discards qualifiers from pointer target
type"
The statment to free the memory is
free(host_mem_resp_ptr, M_DEVBUF);
Can anybody please tell me reason and solution?
Tejas
More information about the freebsd-hackers
mailing list