[PATCH 03/12] include: common.h: move out integer string parsing functions
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Oct 14 04:50:31 PDT 2024
The <linux/kstrtox.h> header is already included into <common.h> via
<linux/kernel.h> and includes a lot more integer parsing functions, so
let's move the few such functions in common.h there as well.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
include/common.h | 6 ------
include/linux/kstrtox.h | 6 ++++++
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/include/common.h b/include/common.h
index 6baab254c80e..d8e55114ce23 100644
--- a/include/common.h
+++ b/include/common.h
@@ -53,12 +53,6 @@ int readline (const char *prompt, char *buf, int len);
/* common/memsize.c */
long get_ram_size (volatile long *, long);
-int parse_area_spec(const char *str, loff_t *start, loff_t *size);
-
-/* Just like simple_strtoul(), but this one honors a K/M/G suffix */
-unsigned long strtoul_suffix(const char *str, char **endp, int base);
-unsigned long long strtoull_suffix(const char *str, char **endp, int base);
-
int mem_parse_options(int argc, char *argv[], char *optstr, int *mode,
char **sourcefile, char **destfile, int *swab);
int memcpy_parse_options(int argc, char *argv[], int *sourcefd,
diff --git a/include/linux/kstrtox.h b/include/linux/kstrtox.h
index 51493c71292b..a98f5791a368 100644
--- a/include/linux/kstrtox.h
+++ b/include/linux/kstrtox.h
@@ -118,6 +118,12 @@ extern long simple_strtol(const char *,char **,unsigned int);
extern unsigned long long simple_strtoull(const char *,char **,unsigned int);
extern long long simple_strtoll(const char *,char **,unsigned int);
+/* Just like simple_strtoul(), but this one honors a K/M/G suffix */
+unsigned long strtoul_suffix(const char *str, char **endp, int base);
+unsigned long long strtoull_suffix(const char *str, char **endp, int base);
+
extern s64 simple_strtofract(const char *cp, char **endp, u32 division);
+int parse_area_spec(const char *str, loff_t *start, loff_t *size);
+
#endif
--
2.39.5
More information about the barebox
mailing list