[RFC PATCH v1 12/12] string.h: Remove strstarts().

From: laniel_francis
Date: Fri Dec 04 2020 - 12:06:36 EST


From: Francis Laniel <laniel_francis@xxxxxxxxxxxxxxxxxxx>

When str_has_prefix() was introduced in commit 495d714ad140 ("Merge tag
'trace-v4.21' of
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace"), this commit
stated that the new function should replace the existing one.

Signed-off-by: Francis Laniel <laniel_francis@xxxxxxxxxxxxxxxxxxx>
---
include/linux/string.h | 10 ----------
1 file changed, 10 deletions(-)

diff --git a/include/linux/string.h b/include/linux/string.h
index b1f3894a0a3e..78bcae9bfa58 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -212,16 +212,6 @@ extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos,

int ptr_to_hashval(const void *ptr, unsigned long *hashval_out);

-/**
- * strstarts - does @str start with @prefix?
- * @str: string to examine
- * @prefix: prefix to look for.
- */
-static inline bool strstarts(const char *str, const char *prefix)
-{
- return strncmp(str, prefix, strlen(prefix)) == 0;
-}
-
size_t memweight(const void *ptr, size_t bytes);

/**
--
2.20.1