e7efa615cc
At the moment, kmalloc() isn't even listed in the kernel API documentation (DocBook/kernel-api.html after running "make htmldocs"). Another issue is that the documentation for kmalloc_node() refers to kcalloc()'s documentation to describe its 'flags' parameter, while kcalloc() refered to kmalloc()'s documentation, which doesn't exist! This patch is a proposed fix for this. It also removes the documentation for kmalloc() in include/linux/slob_def.h which isn't included to generate the documentation anyway. This way, kmalloc() is described in only one place. Acked-by: Christoph Lameter <cl@linux.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
31 lines
752 B
C
31 lines
752 B
C
#ifndef __LINUX_SLOB_DEF_H
|
|
#define __LINUX_SLOB_DEF_H
|
|
|
|
#include <linux/numa.h>
|
|
|
|
void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node);
|
|
|
|
static __always_inline void *kmem_cache_alloc(struct kmem_cache *cachep,
|
|
gfp_t flags)
|
|
{
|
|
return kmem_cache_alloc_node(cachep, flags, NUMA_NO_NODE);
|
|
}
|
|
|
|
void *__kmalloc_node(size_t size, gfp_t flags, int node);
|
|
|
|
static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node)
|
|
{
|
|
return __kmalloc_node(size, flags, node);
|
|
}
|
|
|
|
static __always_inline void *kmalloc(size_t size, gfp_t flags)
|
|
{
|
|
return __kmalloc_node(size, flags, NUMA_NO_NODE);
|
|
}
|
|
|
|
static __always_inline void *__kmalloc(size_t size, gfp_t flags)
|
|
{
|
|
return kmalloc(size, flags);
|
|
}
|
|
|
|
#endif /* __LINUX_SLOB_DEF_H */
|