>>  }
>>
>>  enum write_rom_type {
>> @@ -3643,7 +3646,7 @@ int cpu_memory_rw_debug(CPUState *cpu, target_ulong 
>> addr,
>>          } else {
>>              address_space_rw(cpu->cpu_ases[asidx].as, phys_addr,
>>                               MEMTXATTRS_UNSPECIFIED,
>> -                             buf, l, 0);
>> +                             buf, l, access_type);
>
> Replacing a fixed 0 with access_type looks wrong here, but I don't
> have the context readily to hand to be sure.

In previous patch in the series the "if" part of that statement was
converted to if (access_type == MMU_DATA_STORE), so in the "else"
branch access_type is guaranteed to be MMU_DATA_LOAD (there's also a
g_assert making sure those two are only possible options). Using
"access_type" instead of actual constant here makes the following
patch in which the whole if statement is replaced with just a call to
"address_space_rw" a bit simpler (or at least so I hope).

Andrey

Reply via email to