[openib-general] [PATCH] kDAPL & at: sizeof is not a function

Sean Hefty mshefty at ichips.intel.com
Fri May 20 10:58:50 PDT 2005


Tom Duffy wrote:
> -	rbuf->base = (void *) kmalloc(rsize * sizeof(void *), GFP_ATOMIC);
> +	rbuf->base = (void *) kmalloc(rsize * sizeof *rbuf->base, GFP_ATOMIC);

Should this be sizeof rbuf->base?

Also, do we need any of the casts before the kmallocs?

- Sean



More information about the general mailing list