[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201204170319.20383-13-laniel_francis@privacyrequired.com>
Date: Fri, 4 Dec 2020 18:03:18 +0100
From: laniel_francis@...vacyrequired.com
To: unlisted-recipients:; (no To-header on input)
Cc: Francis Laniel <laniel_francis@...vacyrequired.com>,
linux-kernel@...r.kernel.org
Subject: [RFC PATCH v1 12/12] string.h: Remove strstarts().
From: Francis Laniel <laniel_francis@...vacyrequired.com>
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@...vacyrequired.com>
---
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
Powered by blists - more mailing lists