summaryrefslogtreecommitdiffstats
path: root/lib/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/string.c')
-rw-r--r--lib/string.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/lib/string.c b/lib/string.c
index 453f35994eb6..38e4ca08e757 100644
--- a/lib/string.c
+++ b/lib/string.c
@@ -891,36 +891,6 @@ void *memscan(void *addr, int c, size_t size)
EXPORT_SYMBOL(memscan);
#endif
-/*
- * Merge two NULL-terminated pointer arrays into a newly allocated
- * array, which is also NULL-terminated. Nomenclature is inspired by
- * memset_p() and memcat() found elsewhere in the kernel source tree.
- */
-void **__memcat_p(void **a, void **b)
-{
- void **p = a, **new;
- int nr;
-
- /* count the elements in both arrays */
- for (nr = 0, p = a; *p; nr++, p++)
- ;
- for (p = b; *p; nr++, p++)
- ;
- /* one for the NULL-terminator */
- nr++;
-
- new = kmalloc_array(nr, sizeof(void *), GFP_KERNEL);
- if (!new)
- return NULL;
-
- /* nr -> last index; p points to NULL in b[] */
- for (nr--; nr >= 0; nr--, p = p == b ? &a[nr] : p - 1)
- new[nr] = *p;
-
- return new;
-}
-EXPORT_SYMBOL_GPL(__memcat_p);
-
#ifndef __HAVE_ARCH_STRSTR
/**
* strstr - Find the first substring in a %NUL terminated string