All of lore.kernel.org
 help / color / mirror / Atom feed
From: laniel_francis@privacyrequired.com
To: unlisted-recipients:; (no To-header on input)
Cc: Francis Laniel <laniel_francis@privacyrequired.com>,
	linux-kernel@vger.kernel.org
Subject: [RFC PATCH v1 12/12] string.h: Remove strstarts().
Date: Fri,  4 Dec 2020 18:03:18 +0100	[thread overview]
Message-ID: <20201204170319.20383-13-laniel_francis@privacyrequired.com> (raw)
In-Reply-To: <20201204170319.20383-1-laniel_francis@privacyrequired.com>

From: Francis Laniel <laniel_francis@privacyrequired.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@privacyrequired.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


  parent reply	other threads:[~2020-12-04 17:05 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04 17:03 [RFC PATCH v1 00/12] Replace strstarts() by str_has_prefix() laniel_francis
2020-12-04 17:03 ` [dm-devel] " laniel_francis
2020-12-04 17:03 ` laniel_francis
2020-12-04 17:03 ` laniel_francis
2020-12-04 17:03 ` [RFC PATCH v1 01/12] arm: " laniel_francis
2020-12-04 17:03   ` laniel_francis
2020-12-04 17:03 ` [RFC PATCH v1 02/12] mips: " laniel_francis
2020-12-04 17:03 ` [RFC PATCH v1 03/12] crypto: " laniel_francis
2020-12-04 17:03 ` [RFC PATCH v1 04/12] device-mapper: " laniel_francis
2020-12-04 17:03   ` [dm-devel] " laniel_francis
2020-12-04 17:03 ` [RFC PATCH v1 05/12] renesas: " laniel_francis
2020-12-04 17:03   ` laniel_francis
2020-12-04 17:03 ` [RFC PATCH v1 06/12] omap: " laniel_francis
2020-12-04 17:03   ` laniel_francis
2020-12-04 17:03 ` [RFC PATCH v1 07/12] efi: " laniel_francis
2020-12-04 17:07   ` Ard Biesheuvel
2020-12-04 17:19     ` Francis Laniel
2020-12-04 18:02     ` James Bottomley
2020-12-05 19:08       ` Francis Laniel
2020-12-05 19:36       ` Ard Biesheuvel
2020-12-05 20:24         ` James Bottomley
2020-12-05 20:57           ` Ard Biesheuvel
2020-12-05 21:15             ` James Bottomley
2020-12-05 21:20               ` Ard Biesheuvel
2020-12-05 23:04                 ` James Bottomley
2020-12-07 15:10                   ` Steven Rostedt
2020-12-07 16:25                     ` David Laight
2020-12-05 20:28         ` Rasmus Villemoes
2020-12-10 18:14         ` Arvind Sankar
2020-12-11  9:45           ` David Laight
2020-12-11 16:10             ` Arvind Sankar
2020-12-04 17:03 ` [RFC PATCH v1 08/12] ide: " laniel_francis
2020-12-04 17:03 ` [RFC PATCH v1 09/12] mips: " laniel_francis
2020-12-04 17:03   ` laniel_francis
2020-12-04 17:03 ` [RFC PATCH v1 10/12] module: " laniel_francis
2020-12-04 17:03 ` [RFC PATCH v1 11/12] musb: " laniel_francis
2020-12-04 17:03 ` laniel_francis [this message]
2020-12-04 17:56 ` [RFC PATCH v1 00/12] " James Bottomley
2020-12-04 17:56   ` [dm-devel] " James Bottomley
2020-12-04 17:56   ` James Bottomley
2020-12-04 17:56   ` James Bottomley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201204170319.20383-13-laniel_francis@privacyrequired.com \
    --to=laniel_francis@privacyrequired.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.