Skip to contentSkip to conversation

x86/boot: Remove unused function 'atou'

PATCH Applied [email protected] 2 participants 3 messages Sep 13, 2024 – Nov 7, 2024 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/boot: Remove unused function 'atou'

From: "Dr. David Alan Gilbert" <[email protected]>

I can't find any sign of 'atou' having been used.
Remove it.

---
 arch/x86/boot/boot.h   | 1 -
 arch/x86/boot/string.c | 8 --------
 arch/x86/boot/string.h | 1 -
 3 files changed, 10 deletions(-)
arch/x86/boot/boot.h +0 -1
index 148ba5c5106e..0f24f7ebec9b 100644
@@ -305,7 +305,6 @@ void initregs(struct biosregs *regs);
 int strcmp(const char *str1, const char *str2);
 int strncmp(const char *cs, const char *ct, size_t count);
 size_t strnlen(const char *s, size_t maxlen);
-unsigned int atou(const char *s);
 unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base);
 size_t strlen(const char *s);
 char *strchr(const char *s, int c);
arch/x86/boot/string.c +0 -8
index c23f3b9c84fe..84f7a883ce1e 100644
@@ -88,14 +88,6 @@ size_t strnlen(const char *s, size_t maxlen)
 	return (es - s);
 }
 
-unsigned int atou(const char *s)
-{
-	unsigned int i = 0;
-	while (isdigit(*s))
-		i = i * 10 + (*s++ - '0');
-	return i;
-}
-
 /* Works only for digits and letters, but small and fast */
 #define TOLOWER(x) ((x) | 0x20)
 
arch/x86/boot/string.h +0 -1
index e5d2c6b8c2f1..a5b05ebc037d 100644
@@ -24,7 +24,6 @@ extern size_t strlen(const char *s);
 extern char *strstr(const char *s1, const char *s2);
 extern char *strchr(const char *s, int c);
 extern size_t strnlen(const char *s, size_t maxlen);
-extern unsigned int atou(const char *s);
 extern unsigned long long simple_strtoull(const char *cp, char **endp,
 					  unsigned int base);
 long simple_strtol(const char *cp, char **endp, unsigned int base);
Signature · 1 line
2.46.0
#1 lore raw
Quoted 6 lines · * [email protected] ([email protected]) wrote:

From: "Dr. David Alan Gilbert" <[email protected]>

I can't find any sign of 'atou' having been used.
Remove it.

Ping

Dave

Quoted 52 lines
---
 arch/x86/boot/boot.h   | 1 -
 arch/x86/boot/string.c | 8 --------
 arch/x86/boot/string.h | 1 -
 3 files changed, 10 deletions(-)
arch/x86/boot/boot.h +0 -1
index 148ba5c5106e..0f24f7ebec9b 100644
@@ -305,7 +305,6 @@ void initregs(struct biosregs *regs);
 int strcmp(const char *str1, const char *str2);
 int strncmp(const char *cs, const char *ct, size_t count);
 size_t strnlen(const char *s, size_t maxlen);
-unsigned int atou(const char *s);
 unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base);
 size_t strlen(const char *s);
 char *strchr(const char *s, int c);
arch/x86/boot/string.c +0 -8
index c23f3b9c84fe..84f7a883ce1e 100644
@@ -88,14 +88,6 @@ size_t strnlen(const char *s, size_t maxlen)
 	return (es - s);
 }
 
-unsigned int atou(const char *s)
-{
-	unsigned int i = 0;
-	while (isdigit(*s))
-		i = i * 10 + (*s++ - '0');
-	return i;
-}
-
 /* Works only for digits and letters, but small and fast */
 #define TOLOWER(x) ((x) | 0x20)
 
arch/x86/boot/string.h +0 -1
index e5d2c6b8c2f1..a5b05ebc037d 100644
@@ -24,7 +24,6 @@ extern size_t strlen(const char *s);
 extern char *strstr(const char *s1, const char *s2);
 extern char *strchr(const char *s, int c);
 extern size_t strnlen(const char *s, size_t maxlen);
-extern unsigned int atou(const char *s);
 extern unsigned long long simple_strtoull(const char *cp, char **endp,
 					  unsigned int base);
 long simple_strtol(const char *cp, char **endp, unsigned int base);
Signature · 1 line
2.46.0
Signature · 4 lines
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/
#2 lore raw

[tip: x86/cleanups] x86/boot: Remove unused function atou()

In reply to [email protected]
The following commit has been merged into the x86/cleanups branch of tip:

The following commit has been merged into the x86/cleanups branch of tip:

Commit-ID:     97ecb260d9c19aa044871ae2c89408c340717b61
Gitweb:        https://git.kernel.org/tip/97ecb260d9c19aa044871ae2c89408c340717b61
Author:        Dr. David Alan Gilbert <[email protected]>
AuthorDate:    Fri, 13 Sep 2024 01:57:53 +01:00
Committer:     Borislav Petkov (AMD) <[email protected]>
CommitterDate: Thu, 07 Nov 2024 18:08:23 +01:00

x86/boot: Remove unused function atou()

I can't find any sign of atou() having been used. Remove it.

---
 arch/x86/boot/boot.h   | 1 -
 arch/x86/boot/string.c | 8 --------
 arch/x86/boot/string.h | 1 -
 3 files changed, 10 deletions(-)
arch/x86/boot/boot.h +0 -1
index 148ba5c..0f24f7e 100644
@@ -305,7 +305,6 @@ void initregs(struct biosregs *regs);
 int strcmp(const char *str1, const char *str2);
 int strncmp(const char *cs, const char *ct, size_t count);
 size_t strnlen(const char *s, size_t maxlen);
-unsigned int atou(const char *s);
 unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base);
 size_t strlen(const char *s);
 char *strchr(const char *s, int c);
arch/x86/boot/string.c +0 -8
index c23f3b9..84f7a88 100644
@@ -88,14 +88,6 @@ size_t strnlen(const char *s, size_t maxlen)
 	return (es - s);
 }
 
-unsigned int atou(const char *s)
-{
-	unsigned int i = 0;
-	while (isdigit(*s))
-		i = i * 10 + (*s++ - '0');
-	return i;
-}
-
 /* Works only for digits and letters, but small and fast */
 #define TOLOWER(x) ((x) | 0x20)
 
arch/x86/boot/string.h +0 -1
index e5d2c6b..a5b05eb 100644
@@ -24,7 +24,6 @@ extern size_t strlen(const char *s);
 extern char *strstr(const char *s1, const char *s2);
 extern char *strchr(const char *s, int c);
 extern size_t strnlen(const char *s, size_t maxlen);
-extern unsigned int atou(const char *s);
 extern unsigned long long simple_strtoull(const char *cp, char **endp,
 					  unsigned int base);
 long simple_strtol(const char *cp, char **endp, unsigned int base);