From: Tom Rini <trini@konsulko.com>
To: Raymond Mao <raymond.mao@linaro.org>
Cc: u-boot@lists.denx.de,
Alexey Brodkin <alexey.brodkin@synopsys.com>,
Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>,
Tony Dinh <mibodhi@gmail.com>, Phil Sutter <phil@nwl.cc>,
Walter Schweizer <swwa@users.sourceforge.net>,
Mario Six <mario.six@gdsys.cc>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Simon Glass <sjg@chromium.org>, Nishanth Menon <nm@ti.com>,
Roger Quadros <rogerq@kernel.org>,
Jonathan Humphreys <j-humphreys@ti.com>,
Igor Opaniuk <igor.opaniuk@gmail.com>,
Marek Vasut <marek.vasut+renesas@mailbox.org>,
Bin Meng <bmeng.cn@gmail.com>,
Caleb Connolly <caleb.connolly@linaro.org>,
Masahisa Kojima <kojima.masahisa@socionext.com>,
Eddie James <eajames@linux.ibm.com>,
Jassi Brar <jaswinder.singh@linaro.org>,
Michal Simek <michal.simek@amd.com>,
Masami Hiramatsu <masami.hiramatsu@linaro.org>,
AKASHI Takahiro <akashi.tkhro@gmail.com>,
Etienne Carriere <etienne.carriere@foss.st.com>,
uboot-snps-arc@synopsys.com
Subject: Re: [PATCH v2 4/4] include: Move snprintf to stdio.h
Date: Wed, 15 May 2024 08:37:37 -0600 [thread overview]
Message-ID: <20240515143737.GV2568172@bill-the-cat> (raw)
In-Reply-To: <20240515123213.1701691-5-raymond.mao@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 1775 bytes --]
On Wed, May 15, 2024 at 05:31:59AM -0700, Raymond Mao wrote:
> Move snprintf to stdio.h since it is needed by exteranl libraries.
>
> Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Thanks for doing the work. One problem:
> diff --git a/include/stdio.h b/include/stdio.h
> index 3241e2d493f..ecd0f996efb 100644
> --- a/include/stdio.h
> +++ b/include/stdio.h
> @@ -45,6 +45,7 @@ static inline int vprintf(const char *fmt, va_list args)
> return 0;
> }
> #endif
> +int snprintf(char *buf, size_t size, const char *fmt, ...);
>
> /*
> * FILE based functions (can only be used AFTER relocation!)
> diff --git a/include/vsprintf.h b/include/vsprintf.h
> index ed8a060ee17..fe951471426 100644
> --- a/include/vsprintf.h
> +++ b/include/vsprintf.h
> @@ -218,23 +218,6 @@ char *simple_itoa(ulong val);
> */
> char *simple_xtoa(ulong num);
>
> -/**
> - * 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
> - * @fmt: The format string to use
> - * @...: Arguments for the format string
> - * Return: the number of characters which would be
> - * generated for the given input, excluding the trailing null,
> - * as per ISO C99. If the return is greater than or equal to
> - * @size, the resulting string is truncated.
> - *
> - * See the vsprintf() documentation for format string extensions over C99.
> - */
> -int snprintf(char *buf, size_t size, const char *fmt, ...)
> - __attribute__ ((format (__printf__, 3, 4)));
> -
> /**
> * Format a string and place it in a buffer
> *
Please move the whole thing, comment and attributes over not just the
basic prototype, thanks.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
prev parent reply other threads:[~2024-05-15 14:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-15 12:31 [PATCH v2 0/4] Clean-up patch set for MbedTLS integration Raymond Mao
2024-05-15 12:31 ` [PATCH v2 1/4] image: remove redundant hash includes Raymond Mao
2024-05-15 12:31 ` [PATCH v2 2/4] efi_loader: " Raymond Mao
2024-05-15 12:31 ` [PATCH v2 3/4] md5: Use typedef for MD5 context Raymond Mao
2024-05-15 12:31 ` [PATCH v2 4/4] include: Move snprintf to stdio.h Raymond Mao
2024-05-15 14:37 ` Tom Rini [this message]
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=20240515143737.GV2568172@bill-the-cat \
--to=trini@konsulko.com \
--cc=Eugeniy.Paltsev@synopsys.com \
--cc=akashi.tkhro@gmail.com \
--cc=alexey.brodkin@synopsys.com \
--cc=bmeng.cn@gmail.com \
--cc=caleb.connolly@linaro.org \
--cc=eajames@linux.ibm.com \
--cc=etienne.carriere@foss.st.com \
--cc=igor.opaniuk@gmail.com \
--cc=ilias.apalodimas@linaro.org \
--cc=j-humphreys@ti.com \
--cc=jaswinder.singh@linaro.org \
--cc=kojima.masahisa@socionext.com \
--cc=marek.vasut+renesas@mailbox.org \
--cc=mario.six@gdsys.cc \
--cc=masami.hiramatsu@linaro.org \
--cc=mibodhi@gmail.com \
--cc=michal.simek@amd.com \
--cc=nm@ti.com \
--cc=phil@nwl.cc \
--cc=raymond.mao@linaro.org \
--cc=rogerq@kernel.org \
--cc=sjg@chromium.org \
--cc=swwa@users.sourceforge.net \
--cc=u-boot@lists.denx.de \
--cc=uboot-snps-arc@synopsys.com \
--cc=xypron.glpk@gmx.de \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).