diff options
author | Tony Luck <tony.luck@intel.com> | 2005-09-08 17:27:13 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-09-08 17:27:13 -0400 |
commit | 344a076110f4ecb16ea6d286b63be696604982ed (patch) | |
tree | def6e229efdb6ee91b631b6695bf7f9ace8e2719 /include/linux/slab.h | |
parent | 9b17e7e74e767d8a494a74c3c459aeecd1e08c5f (diff) | |
parent | 1b11d78cf87a7014f96e5b7fa2e1233cc8081a00 (diff) |
[IA64] Manual merge fix for 3 files
arch/ia64/Kconfig
arch/ia64/kernel/acpi.c
include/asm-ia64/irq.h
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include/linux/slab.h')
-rw-r--r-- | include/linux/slab.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/slab.h b/include/linux/slab.h index 80b2dfde2e80..42a6bea58af3 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -99,7 +99,21 @@ found: | |||
99 | return __kmalloc(size, flags); | 99 | return __kmalloc(size, flags); |
100 | } | 100 | } |
101 | 101 | ||
102 | extern void *kcalloc(size_t, size_t, unsigned int __nocast); | 102 | extern void *kzalloc(size_t, unsigned int __nocast); |
103 | |||
104 | /** | ||
105 | * kcalloc - allocate memory for an array. The memory is set to zero. | ||
106 | * @n: number of elements. | ||
107 | * @size: element size. | ||
108 | * @flags: the type of memory to allocate. | ||
109 | */ | ||
110 | static inline void *kcalloc(size_t n, size_t size, unsigned int __nocast flags) | ||
111 | { | ||
112 | if (n != 0 && size > INT_MAX / n) | ||
113 | return NULL; | ||
114 | return kzalloc(n * size, flags); | ||
115 | } | ||
116 | |||
103 | extern void kfree(const void *); | 117 | extern void kfree(const void *); |
104 | extern unsigned int ksize(const void *); | 118 | extern unsigned int ksize(const void *); |
105 | 119 | ||