]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/slab.c
[PATCH] slob: introduce mm/util.c for shared functions
[linux-2.6-omap-h63xx.git] / mm / slab.c
index 76b092bd0bf7122b7a18dc8061dcd76e23bdb61a..1c46c6383552ffa82921934bb6ce05715dd0fd88 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3052,20 +3052,6 @@ void kmem_cache_free(kmem_cache_t *cachep, void *objp)
 }
 EXPORT_SYMBOL(kmem_cache_free);
 
-/**
- * kzalloc - allocate memory. The memory is set to zero.
- * @size: how many bytes of memory are required.
- * @flags: the type of memory to allocate.
- */
-void *kzalloc(size_t size, gfp_t flags)
-{
-       void *ret = kmalloc(size, flags);
-       if (ret)
-               memset(ret, 0, size);
-       return ret;
-}
-EXPORT_SYMBOL(kzalloc);
-
 /**
  * kfree - free previously allocated memory
  * @objp: pointer returned by kmalloc.
@@ -3659,26 +3645,3 @@ unsigned int ksize(const void *objp)
 
        return obj_reallen(page_get_cache(virt_to_page(objp)));
 }
-
-
-/*
- * kstrdup - allocate space for and copy an existing string
- *
- * @s: the string to duplicate
- * @gfp: the GFP mask used in the kmalloc() call when allocating memory
- */
-char *kstrdup(const char *s, gfp_t gfp)
-{
-       size_t len;
-       char *buf;
-
-       if (!s)
-               return NULL;
-
-       len = strlen(s) + 1;
-       buf = kmalloc(len, gfp);
-       if (buf)
-               memcpy(buf, s, len);
-       return buf;
-}
-EXPORT_SYMBOL(kstrdup);