Hi Aristo,

On 2026-10-08T06:59:47, Aristo Chen <[email protected]> wrote:
> fit: use FIT_DATA_SIZE_UNCIPHERED_PROP for data-size-unciphered
>
> Commit 195f273b6c86 ("tools: mkimage: resolve image-data references
> between FIT images") added FIT_DATA_SIZE_UNCIPHERED_PROP but did not
> convert the existing code that spells the property name out:
> fit_image_get_data_size_unciphered() on the boot side, and in mkimage
> fit_image_write_cipher(), which adds the property, and
> fit_image_cipher_data(), which checks for it to avoid encrypting the
> data twice. Use the constant there as well.
>
> No functional change intended.
>
> Signed-off-by: Aristo Chen <[email protected]>
>
> boot/image-fit.c   | 2 +-
>  tools/image-host.c | 6 ++++--
>  2 files changed, 5 insertions(+), 3 deletions(-)

> diff --git a/tools/image-host.c b/tools/image-host.c
> @@ -608,7 +609,8 @@ int fit_image_cipher_data(const char *keydir, void 
> *keydest,
> -     if (fdt_getprop(fit, image_noffset, "data-size-unciphered", &len))
> +     if (fdt_getprop(fit, image_noffset,
> +                     FIT_DATA_SIZE_UNCIPHERED_PROP, &len))

Reviewed-by: Simon Glass <[email protected]>

BTW, test/boot/fit_cipher.c still spells out data-size-unciphered in
the two fdt_setprop() calls in
fit_cipher_test_data_size_unciphered_len().

Regards,
Simon

Reply via email to