From patchwork Tue Sep 9 15:17:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 263 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757431128; bh=lv/Cpc24YOdEF3ne5a/0tUsxmaoBQKtVrg+T6hgKG1c=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=P+N+qLTLQkE5TBP+WEuq5SlOqzeJ6wXkIbtxk97hDKOEIX30kp6imvF5tDlkYGasY Cjbk73jzbKfwLQQxYxh6Iy73ongULd/QZDjQ5H1TqwOFJOq19K9w6N/PEIASIGHd68 uglnf5TcZ5uJ1IPfbBqmGivuxWDpLeJSqFvTOHnuGSjBkhaty92br4NffXnmDyjbeI XJ4qjYvWROMfyGGeehOzInyc7gtp/sQ3a9drqdHDfruE27y9TqeqI2/NR3K/B141LM bjclAojuT3OhZ2k/i6finG3T0tR+bQujwcBOIfze1Je+wsSLzWlb4I6vxAwL9wNR25 OG12hnCpqHkOQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1BBC867A6E for ; Tue, 9 Sep 2025 09:18:48 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id QTk9C-RQpfC9 for ; Tue, 9 Sep 2025 09:18:48 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757431128; bh=lv/Cpc24YOdEF3ne5a/0tUsxmaoBQKtVrg+T6hgKG1c=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=P+N+qLTLQkE5TBP+WEuq5SlOqzeJ6wXkIbtxk97hDKOEIX30kp6imvF5tDlkYGasY Cjbk73jzbKfwLQQxYxh6Iy73ongULd/QZDjQ5H1TqwOFJOq19K9w6N/PEIASIGHd68 uglnf5TcZ5uJ1IPfbBqmGivuxWDpLeJSqFvTOHnuGSjBkhaty92br4NffXnmDyjbeI XJ4qjYvWROMfyGGeehOzInyc7gtp/sQ3a9drqdHDfruE27y9TqeqI2/NR3K/B141LM bjclAojuT3OhZ2k/i6finG3T0tR+bQujwcBOIfze1Je+wsSLzWlb4I6vxAwL9wNR25 OG12hnCpqHkOQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 07F3967A74 for ; Tue, 9 Sep 2025 09:18:48 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757431122; bh=JRgUkVK8nPbO1r43tFlrDWmZMjHgsctqtAtzn+lScbg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jwxc22ba9f3532BSiMiSoL8kSLXOufc8eTdm/ytCbSOGzWD3u6eGEvt/MYTJuoO/s b5tsrfAcehT59CCgxw3RLFdatuj3D3mLkNszyk7wYDlJuF5/aNwLaehMqJuJhyXAe7 +0UToLlc6Yo8kwd43vNeHwrnB7yuD06hKjZPCHFA2Vs6ZH/ASs5HIzZrWULERK1y+r dC+A1PGPkI0tGc73iStKxenjsq4g93z1cqTZNV7wXpcsIfQF3M7lgAGCw+qc97fYzQ gDeSKgXqsH9KkoVCUjKmgoxPJOpQpb3RCbCv4zcSbSs+F9HdtlAvZe+WxsQ0yU/cXy XdxHojeQC82VQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4558B679D7; Tue, 9 Sep 2025 09:18:42 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id NStzQdb0AZ5j; Tue, 9 Sep 2025 09:18:42 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757431121; bh=VQBc2MqD6+AfwmUlwimr+/EzNUdQ8rS+kLK80Bb/h9I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nDeW1PSWq2f0yx1R/t2cBiXVPos7YkUsCE+F1dHZ5Y3pyidCt9u90rRqD898lOYB/ I81/w6EjzV31zj4yZebE8MIw96QRzAtdidb0k66m4dNszpLG3ovpZbQ4Lhol26cuSp jv4HNCwxaSQi33fgkP7IK31iofmVqo+IBlWYQ0xYO3yo+cVZbXLUZAAlgcixaHu76L UjIfpHREgeBOLZiRtmDQo5/0AifrdtHPr2iUP52ZfpGRwTMoAt1Pq9HqE9NKyH16Fl F4+5qW+reaVhs9qh/dkhTMbkVHc18GuCix1rKYam+89o0mCDxmC8zJpcnsFlq0vzAT TzBFnFvnA/flw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 9C270679D6; Tue, 9 Sep 2025 09:18:41 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Tue, 9 Sep 2025 09:17:58 -0600 Message-ID: <20250909151824.2327219-2-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250909151824.2327219-1-sjg@u-boot.org> References: <20250909151824.2327219-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: QXVUUEET6ERZ62OT733JNSMK5QDH67MB X-Message-ID-Hash: QXVUUEET6ERZ62OT733JNSMK5QDH67MB X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 01/18] lib: Tidy up comments for vsprintf functions List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Some of the functions in this file do not follow the normal style. Fix this so that things are more consistent. Signed-off-by: Simon Glass Reviewed-by: Heinrich Schuchardt --- include/vsprintf.h | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/include/vsprintf.h b/include/vsprintf.h index 9da6ce7cc4d..3cb335515e4 100644 --- a/include/vsprintf.h +++ b/include/vsprintf.h @@ -11,7 +11,7 @@ #include /** - * simple_strtoul - convert a string to an unsigned long + * simple_strtoul() - convert a string to an unsigned long * * @cp: The string to be converted * @endp: Updated to point to the first character not converted @@ -32,7 +32,7 @@ ulong simple_strtoul(const char *cp, char **endp, unsigned int base); /** - * hex_strtoul - convert a string in hex to an unsigned long + * hex_strtoul() - convert a string in hex to an unsigned long * * @cp: The string to be converted * @endp: Updated to point to the first character not converted @@ -45,7 +45,7 @@ ulong simple_strtoul(const char *cp, char **endp, unsigned int base); unsigned long hextoul(const char *cp, char **endp); /** - * hex_strtoull - convert a string in hex to an unsigned long long + * hex_strtoull() - convert a string in hex to an unsigned long long * * @cp: The string to be converted * @endp: Updated to point to the first character not converted @@ -58,7 +58,7 @@ unsigned long hextoul(const char *cp, char **endp); unsigned long long hextoull(const char *cp, char **endp); /** - * dec_strtoul - convert a string in decimal to an unsigned long + * dec_strtoul() - convert a string in decimal to an unsigned long * * @cp: The string to be converted * @endp: Updated to point to the first character not converted @@ -71,7 +71,7 @@ unsigned long long hextoull(const char *cp, char **endp); unsigned long dectoul(const char *cp, char **endp); /** - * strict_strtoul - convert a string to an unsigned long strictly + * strict_strtoul() - convert a string to an unsigned long strictly * @cp: The string to be converted * @base: The number base to use (0 for the default) * @res: The converted result value @@ -100,6 +100,7 @@ unsigned long dectoul(const char *cp, char **endp); * */ int strict_strtoul(const char *cp, unsigned int base, unsigned long *res); + unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base); long simple_strtol(const char *cp, char **endp, unsigned int base); @@ -178,7 +179,7 @@ void panic(const char *fmt, ...) void panic_str(const char *str) __attribute__ ((noreturn)); /** - * Format a string and place it in a buffer + * sprintf() - Format a string and place it in a buffer * * @buf: The buffer to place the result into * @fmt: The format string to use @@ -193,7 +194,7 @@ int sprintf(char *buf, const char *fmt, ...) __attribute__ ((format (__printf__, 2, 3))); /** - * Format a string and place it in a buffer (va_list version) + * vsprintf() - Format a string and place it in a buffer (va_list version) * * @buf: The buffer to place the result into * @fmt: The format string to use @@ -232,7 +233,7 @@ char *simple_itoa(ulong val); char *simple_xtoa(ulong num); /** - * Format a string and place it in a buffer + * scnprintf() - Format a string and place it in a buffer * * @buf: The buffer to place the result into * @size: The size of the buffer, including the trailing null space @@ -248,7 +249,7 @@ int scnprintf(char *buf, size_t size, const char *fmt, ...) __attribute__ ((format (__printf__, 3, 4))); /** - * Format a string and place it in a buffer (base function) + * vsnprintf() - Format a string and place it in a buffer (base function) * * @buf: The buffer to place the result into * @size: The size of the buffer, including the trailing null space @@ -273,7 +274,7 @@ int scnprintf(char *buf, size_t size, const char *fmt, ...) int vsnprintf(char *buf, size_t size, const char *fmt, va_list args); /** - * Format a string and place it in a buffer (va_list version) + * vscnprintf() - Format a string and place it in a buffer (va_list version) * * @buf: The buffer to place the result into * @size: The size of the buffer, including the trailing null space @@ -349,7 +350,7 @@ const char **str_to_list(const char *instr); void str_free_list(const char **ptr); /** - * vsscanf - Unformat a buffer into a list of arguments + * vsscanf() - Unformat a buffer into a list of arguments * @inp: input buffer * @fmt0: format of buffer * @ap: arguments @@ -357,7 +358,7 @@ void str_free_list(const char **ptr); int vsscanf(const char *inp, char const *fmt0, va_list ap); /** - * sscanf - Unformat a buffer into a list of arguments + * sscanf() - Unformat a buffer into a list of arguments * @buf: input buffer * @fmt: formatting of buffer * @...: resulting arguments