mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 03/12] include: common.h: move out integer string parsing functions
Date: Mon, 14 Oct 2024 13:50:31 +0200	[thread overview]
Message-ID: <20241014115040.2843121-4-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20241014115040.2843121-1-a.fatoum@pengutronix.de>

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@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




  parent reply	other threads:[~2024-10-14 13:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-14 11:50 [PATCH 00/12] include: common.h: make it include only headers Ahmad Fatoum
2024-10-14 11:50 ` [PATCH 01/12] include: common.h: move barebox startup functions into separate header Ahmad Fatoum
2024-10-14 11:50 ` [PATCH 02/12] include: common.h: move ctrlc() functions into stdio.h Ahmad Fatoum
2024-10-14 11:50 ` Ahmad Fatoum [this message]
2024-10-14 11:50 ` [PATCH 04/12] include: common.h: move out endianness macro sanity check Ahmad Fatoum
2024-10-14 11:50 ` [PATCH 05/12] include: common.h: move out user interface functions into stdio.h Ahmad Fatoum
2024-10-14 11:50 ` [PATCH 06/12] include: common.h: move out memory option parsing prototypes Ahmad Fatoum
2024-10-14 11:50 ` [PATCH 07/12] include: common.h: move out RW_BUF_SIZE definition Ahmad Fatoum
2024-10-14 11:50 ` [PATCH 08/12] commands: add macro to simplify defining one shot commands Ahmad Fatoum
2024-10-14 11:50 ` [PATCH 09/12] commands: reginfo: make command mpc5xxx-specific Ahmad Fatoum
2024-10-15  7:13   ` Sascha Hauer
2024-10-15  7:20     ` Ahmad Fatoum
2024-10-14 11:50 ` [PATCH 10/12] include: common.h: move out get_ram_size Ahmad Fatoum
2024-10-14 11:50 ` [PATCH 11/12] include: align: reword STACK_ALIGN_ARRAY macro parameter for clarity Ahmad Fatoum
2024-10-14 11:50 ` [PATCH 12/12] ARM: bcm283x: remove common.h include in mbox.h Ahmad Fatoum
2024-10-15  7:10 ` [PATCH 00/12] include: common.h: make it include only headers Sascha Hauer
2024-10-15  7:16   ` Sascha Hauer
2024-10-15 13:35     ` Konstantin Ryabitsev
2024-10-16 10:25       ` Sascha Hauer

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=20241014115040.2843121-4-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox