From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Simon Glass <sjg@chromium.org>,
U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Michal Simek <michal.simek@amd.com>,
Sean Anderson <seanga2@gmail.com>,
Lean Sheng Tan <sheng.tan@9elements.com>,
Simon Glass <sjg@chromium.org>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH v2 01/21] sandbox: Use const in os_jump_to_file()
Date: Thu, 18 Jul 2024 10:02:07 +0200 [thread overview]
Message-ID: <871q3rm8lc.fsf@baylibre.com> (raw)
In-Reply-To: <20240713070055.2172883-2-sjg@chromium.org>
Hi Simon,
Thank you for the patch.
On sam., juil. 13, 2024 at 08:00, Simon Glass <sjg@chromium.org> wrote:
> The argument array is not changed by the callee, so mark it const.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
> ---
>
> (no changes since v1)
>
> arch/sandbox/cpu/os.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c
> index d7869b2e368..6a8a5e7b89b 100644
> --- a/arch/sandbox/cpu/os.c
> +++ b/arch/sandbox/cpu/os.c
> @@ -808,7 +808,7 @@ static int make_exec(char *fname, const void *data, int size)
> * @count: Number of arguments in @add_args
> * Return: 0 if OK, -ENOMEM if out of memory
> */
> -static int add_args(char ***argvp, char *add_args[], int count)
> +static int add_args(char ***argvp, const char *add_args[], int count)
> {
> char **argv, **ap;
> int argc;
> @@ -859,7 +859,7 @@ static int os_jump_to_file(const char *fname, bool delete_it)
> struct sandbox_state *state = state_get_current();
> char mem_fname[30];
> int fd, err;
> - char *extra_args[5];
> + const char *extra_args[5];
> char **argv = state->argv;
> int argc;
> #ifdef DEBUG
> --
> 2.34.1
next prev parent reply other threads:[~2024-07-18 8:02 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-13 7:00 [PATCH v2 00/21] Universal Payload initial series Simon Glass
2024-07-13 7:00 ` [PATCH v2 01/21] sandbox: Use const in os_jump_to_file() Simon Glass
2024-07-18 8:02 ` Mattijs Korpershoek [this message]
2024-07-13 7:00 ` [PATCH v2 02/21] sandbox: Fix a comment in os_find_u_boot() Simon Glass
2024-07-18 8:02 ` Mattijs Korpershoek
2024-07-13 7:00 ` [PATCH v2 03/21] test: Move some SPL-loading test-code into sandbox common Simon Glass
2024-07-18 14:11 ` Sean Anderson
2024-07-13 7:00 ` [PATCH v2 04/21] sandbox: Enable SPL_LOAD_BLOCK Simon Glass
2024-07-18 13:28 ` Sean Anderson
2024-07-18 23:58 ` Sean Anderson
2024-07-13 7:00 ` [PATCH v2 05/21] fdt: Don't overwrite bloblist devicetree Simon Glass
2024-07-13 7:00 ` [PATCH v2 06/21] sandbox: fdt: Avoid overwriting an existing fdt Simon Glass
2024-07-13 7:00 ` [PATCH v2 07/21] sandbox: Return error code from read/write/seek Simon Glass
2024-07-13 7:00 ` [PATCH v2 08/21] sandbox: Add ELF file to VPL u-boot.img Simon Glass
2024-07-13 7:00 ` [PATCH v2 09/21] sandbox: Set up global_data earlier Simon Glass
2024-07-13 7:00 ` [PATCH v2 10/21] upl: Add support for reading a upl handoff Simon Glass
2024-07-18 14:41 ` Heinrich Schuchardt
2024-07-20 12:36 ` Simon Glass
2024-07-13 7:00 ` [PATCH v2 11/21] upl: Add support for writing " Simon Glass
2024-07-13 7:00 ` [PATCH v2 12/21] upl: Add basic tests Simon Glass
2024-07-13 7:00 ` [PATCH v2 13/21] upl: Add a command Simon Glass
2024-07-13 7:00 ` [PATCH v2 14/21] upl: Add support for Universal Payload in SPL Simon Glass
2024-07-13 7:00 ` [PATCH v2 15/21] spl: Plumb in the Universal Payload handoff Simon Glass
2024-07-18 13:54 ` Sean Anderson
2024-07-20 12:36 ` Simon Glass
2024-07-20 14:44 ` Sean Anderson
2024-07-21 10:08 ` Simon Glass
2024-07-13 7:00 ` [PATCH v2 16/21] upl: Plumb in universal payload to the init process Simon Glass
2024-07-13 7:00 ` [PATCH v2 17/21] sandbox_vpl: Enable Universal Payload Simon Glass
2024-07-13 7:00 ` [PATCH v2 18/21] upl: Add initial documentation Simon Glass
2024-07-13 7:00 ` [PATCH v2 19/21] sandbox: Add a flag to enable UPL Simon Glass
2024-07-13 7:00 ` [PATCH v2 20/21] sandbox: Add an SPL loader for UPL Simon Glass
2024-07-18 14:12 ` Sean Anderson
2024-07-20 12:36 ` Simon Glass
2024-07-13 7:00 ` [PATCH v2 21/21] upl: Add an end-to-end test Simon Glass
2024-07-13 8:12 ` [PATCH v2 00/21] Universal Payload initial series Mark Kettenis
2024-07-13 19:40 ` Heinrich Schuchardt
2024-07-16 19:08 ` Tom Rini
2024-07-18 8:23 ` Heinrich Schuchardt
2024-07-18 14:15 ` Tom Rini
2024-08-07 14:36 ` Simon Glass
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=871q3rm8lc.fsf@baylibre.com \
--to=mkorpershoek@baylibre.com \
--cc=michal.simek@amd.com \
--cc=seanga2@gmail.com \
--cc=sheng.tan@9elements.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--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