Hi Marek,

On 2026-10-27T23:15:27, Marek Vasut <[email protected]> wrote:
> tools: mkimage: Simplify fit_pre_load_data() data types
>
> The fdt_getprop() already returns strings, use const char *
> and get rid of the void types and multiple type casts. No
> functional change.
>
> Signed-off-by: Marek Vasut <[email protected]>
>
>  tools/image-host.c | 19 +++++++++----------
>  1 file changed, 9 insertions(+), 10 deletions(-)

> diff --git a/tools/image-host.c b/tools/image-host.c
> @@ -1721,7 +1721,7 @@ static int fit_pre_load_data_key_rsa(const char 
> *keydir, void *keydest,
>  static int fit_pre_load_data_key_ecdsa(const char *keydir, void *keydest,
> -                                    int pre_load_noffset, const void 
> *key_name,
> +                                    int pre_load_noffset, const char 
> *key_name,
>                                      const void *algo_name)

(not sure if you missed these or decided not to do them, so here they
are again just in case)

The 'algo_name' parameter is still const void * here, so the two (char
*) casts in the 'Can't find valid checksum/crypto' fprintf() calls
remain. Please can you change it to const char * too and drop those
casts?

> diff --git a/tools/image-host.c b/tools/image-host.c
> @@ -1794,10 +1794,9 @@ int fit_pre_load_data(const char *keydir, void 
> *keydest, void *fit)
> -             fprintf(stderr, "The name of the algo is invalid: %s\n",
> -                     (char *)algo_name);
> +             fprintf(stderr, "The name of the algo is invalid: %s\n", 
> algo_name);

This line is 84 columns, so please can you keep the wrap?

Regards,
Simon

Reply via email to