From: Joe Perches Date: Fri, 11 Oct 2013 20:11:38 +0000 (-0700) Subject: devres: add kernel standard devm_k.alloc functions X-Git-Tag: omap-for-v3.13/fixes-for-merge-window-take2~64^2~32 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64c862a839a8db2c02bbaa88b923d13e1208919d;p=pandora-kernel.git devres: add kernel standard devm_k.alloc functions Currently, devm_ managed memory only supports kzalloc. Convert the devm_kzalloc implementation to devm_kmalloc and remove the complete memset to 0 but still set the initial struct devres header and whatever padding before data to 0. Add the other normal alloc variants as static inlines with __GFP_ZERO added to the gfp flag where appropriate: devm_kzalloc devm_kcalloc devm_kmalloc_array Add gfp.h to device.h for the newly added static inlines. akpm: the current API forces us to replace kmalloc() with kzalloc() when performing devm_ conversions. This adds a relatively minor overhead. More significantly, it will defeat kmemcheck used-uninitialized checking, and for a particular driver, losing used-uninitialised checking for their core controlling data structures will significantly degrade kmemcheck usefulness. Signed-off-by: Joe Perches Cc: Tejun Heo Cc: Sangjung Woo Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed