aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/core.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-10-11 13:11:38 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-16 18:29:07 -0700
commit64c862a839a8db2c02bbaa88b923d13e1208919d (patch)
tree0b3765aec1193c5040f8f840edd36876b7412dd5 /drivers/base/core.c
parentsysfs/bin: Fix size handling overflow for bin_attribute (diff)
downloadlinux-dev-64c862a839a8db2c02bbaa88b923d13e1208919d.tar.xz
linux-dev-64c862a839a8db2c02bbaa88b923d13e1208919d.zip
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 <joe@perches.com> Cc: Tejun Heo <tj@kernel.org> Cc: Sangjung Woo <sangjung.woo@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/core.c')
0 files changed, 0 insertions, 0 deletions