On Wed, 2017-05-24 at 13:18 +0300, Alexey Dobriyan wrote: > Proper fix is to introduce typed allocation macros with the following > signatures: > > T* lmalloc(T, gfp); [] > struct foo *x; > x = lmalloc(struct foo, GFP_KERNEL);
Then code would be written x = lmalloc(typeof(*x), GFP_KERNEL);