Message ID | 20210823164157.751807-2-philmd@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | physmem: Have flaview API check bus permission from MemTxAttrs argument | expand |
On Mon, Aug 23, 2021 at 06:41:53PM +0200, Philippe Mathieu-Daudé wrote: > Remove unuseful local 'result' variables. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com>
On 23.08.21 18:41, Philippe Mathieu-Daudé wrote: > Remove unuseful local 'result' variables. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> > --- Reviewed-by: David Hildenbrand <david@redhat.com>
On 210823 1841, Philippe Mathieu-Daudé wrote: > Remove unuseful local 'result' variables. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> > --- > softmmu/physmem.c | 11 +++-------- > 1 file changed, 3 insertions(+), 8 deletions(-) > Reviewed-by: Alexander Bulekov <alxndr@bu.edu>
On Mon, Aug 23, 2021 at 06:41:53PM +0200, Philippe Mathieu-Daudé wrote: > Remove unuseful local 'result' variables. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> > --- > softmmu/physmem.c | 11 +++-------- > 1 file changed, 3 insertions(+), 8 deletions(-) Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 2e18947598e..e534dc69918 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -2810,14 +2810,11 @@ static MemTxResult flatview_write(FlatView *fv, hwaddr addr, MemTxAttrs attrs, hwaddr l; hwaddr addr1; MemoryRegion *mr; - MemTxResult result = MEMTX_OK; l = len; mr = flatview_translate(fv, addr, &addr1, &l, true, attrs); - result = flatview_write_continue(fv, addr, attrs, buf, len, - addr1, l, mr); - - return result; + return flatview_write_continue(fv, addr, attrs, buf, len, + addr1, l, mr); } /* Called within RCU critical section. */ @@ -3114,12 +3111,10 @@ bool address_space_access_valid(AddressSpace *as, hwaddr addr, MemTxAttrs attrs) { FlatView *fv; - bool result; RCU_READ_LOCK_GUARD(); fv = address_space_to_flatview(as); - result = flatview_access_valid(fv, addr, len, is_write, attrs); - return result; + return flatview_access_valid(fv, addr, len, is_write, attrs); } static hwaddr
Remove unuseful local 'result' variables. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> --- softmmu/physmem.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)