[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201204170319.20383-10-laniel_francis@privacyrequired.com>
Date: Fri, 4 Dec 2020 18:03:15 +0100
From: laniel_francis@...vacyrequired.com
To: Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Florian Fainelli <f.fainelli@...il.com>,
bcm-kernel-feedback-list@...adcom.com
Cc: Francis Laniel <laniel_francis@...vacyrequired.com>,
linux-mips@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: [RFC PATCH v1 09/12] mips: Replace strstarts() by str_has_prefix().
From: Francis Laniel <laniel_francis@...vacyrequired.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@...vacyrequired.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
Powered by blists - more mailing lists