On Mon, 27 Jan 2025, Philippe Mathieu-Daudé wrote:
> load_elf_ram_sym() compares target_data_order versus
> host data_order. Rename 'data_order' -> 'host_data_order'
> to ease code review.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
> ---
> hw/core/loader.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/hw/core/loader.c b/hw/core/loader.c
> index ead10fb6cb5..fc2e8f91267 100644
> --- a/hw/core/loader.c
> +++ b/hw/core/loader.c
> @@ -443,7 +443,7 @@ ssize_t load_elf_ram_sym(const char *filename,
> int clear_lsb, int data_swab,
> AddressSpace *as, bool load_rom, symbol_fn_t sym_cb)
> {
> - int fd, data_order, target_data_order, must_swab;
> + int fd, host_data_order, target_data_order, must_swab;
> ssize_t ret = ELF_LOAD_FAILED;
> uint8_t e_ident[EI_NIDENT];
>
> @@ -462,11 +462,11 @@ ssize_t load_elf_ram_sym(const char *filename,
> goto fail;
> }
> #if HOST_BIG_ENDIAN
> - data_order = ELFDATA2MSB;
> + host_data_order = ELFDATA2MSB;
> #else
> - data_order = ELFDATA2LSB;
> + host_data_order = ELFDATA2LSB;
> #endif
> - must_swab = data_order != e_ident[EI_DATA];
> + must_swab = host_data_order != e_ident[EI_DATA];
> if (big_endian) {
> target_data_order = ELFDATA2MSB;
> } else {
>