softmmu/physmem: Simplify flatview_write and address_space_access_valid
Remove unuseful local 'result' variables. Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Alexander Bulekov <alxndr@bu.edu> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20211215182421.418374-3-philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
2058fdbe81
commit
58e74682ba
|
@ -2816,14 +2816,11 @@ static MemTxResult flatview_write(FlatView *fv, hwaddr addr, MemTxAttrs attrs,
|
||||||
hwaddr l;
|
hwaddr l;
|
||||||
hwaddr addr1;
|
hwaddr addr1;
|
||||||
MemoryRegion *mr;
|
MemoryRegion *mr;
|
||||||
MemTxResult result = MEMTX_OK;
|
|
||||||
|
|
||||||
l = len;
|
l = len;
|
||||||
mr = flatview_translate(fv, addr, &addr1, &l, true, attrs);
|
mr = flatview_translate(fv, addr, &addr1, &l, true, attrs);
|
||||||
result = flatview_write_continue(fv, addr, attrs, buf, len,
|
return flatview_write_continue(fv, addr, attrs, buf, len,
|
||||||
addr1, l, mr);
|
addr1, l, mr);
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Called within RCU critical section. */
|
/* Called within RCU critical section. */
|
||||||
|
@ -3139,12 +3136,10 @@ bool address_space_access_valid(AddressSpace *as, hwaddr addr,
|
||||||
MemTxAttrs attrs)
|
MemTxAttrs attrs)
|
||||||
{
|
{
|
||||||
FlatView *fv;
|
FlatView *fv;
|
||||||
bool result;
|
|
||||||
|
|
||||||
RCU_READ_LOCK_GUARD();
|
RCU_READ_LOCK_GUARD();
|
||||||
fv = address_space_to_flatview(as);
|
fv = address_space_to_flatview(as);
|
||||||
result = flatview_access_valid(fv, addr, len, is_write, attrs);
|
return flatview_access_valid(fv, addr, len, is_write, attrs);
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static hwaddr
|
static hwaddr
|
||||||
|
|
Loading…
Reference in a new issue