From: laniel_francis@privacyrequired.com
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Florian Fainelli <f.fainelli@gmail.com>,
bcm-kernel-feedback-list@broadcom.com
Cc: Francis Laniel <laniel_francis@privacyrequired.com>,
linux-mips@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [RFC PATCH v1 09/12] mips: Replace strstarts() by str_has_prefix().
Date: Fri, 4 Dec 2020 18:03:15 +0100 [thread overview]
Message-ID: <20201204170319.20383-10-laniel_francis@privacyrequired.com> (raw)
In-Reply-To: <20201204170319.20383-1-laniel_francis@privacyrequired.com>
From: Francis Laniel <laniel_francis@privacyrequired.com>
The two functions indicates if a string begins with a given prefix.
The only difference is that strstarts() returns a bool while str_has_prefix()
returns the length of the prefix if the string begins with it or 0 otherwise.
Signed-off-by: Francis Laniel <laniel_francis@privacyrequired.com>
---
arch/mips/bcm63xx/boards/board_bcm963xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/boards/board_bcm963xx.c
index 01aff80a5967..85ccb2b02621 100644
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -747,7 +747,7 @@ void __init board_prom_init(void)
/* dump cfe version */
cfe = boot_addr + BCM963XX_CFE_VERSION_OFFSET;
- if (strstarts(cfe, "cfe-")) {
+ if (str_has_prefix(cfe, "cfe-")) {
if(cfe[4] == 'v') {
if(cfe[5] == 'd')
snprintf(cfe_version, 11, "%s",
--
2.20.1
next prev parent reply other threads:[~2020-12-04 17:06 UTC|newest]
Thread overview: 4+ 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 ` [RFC PATCH v1 02/12] mips: " laniel_francis
2020-12-04 17:03 ` laniel_francis [this message]
2020-12-04 17:56 ` [RFC PATCH v1 00/12] " 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-10-laniel_francis@privacyrequired.com \
--to=laniel_francis@privacyrequired.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=f.fainelli@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).