Incidental to the last commit...these code paths could be cleaned up slightly and a level of indentation removed.
Signed-off-by: Dan Cross <[email protected]> --- kern/arch/x86/msr.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/kern/arch/x86/msr.c b/kern/arch/x86/msr.c index 7a944de..9dedce1 100644 --- a/kern/arch/x86/msr.c +++ b/kern/arch/x86/msr.c @@ -40,11 +40,10 @@ static void msr_smp_read(void *opaque) uint64_t value; err = msr_get_core_address(coreno, srv->msra, &addr); - if (!err) { + if (!err) err = safe_read_msr(addr, &value); - if (!err) - err = msr_set_core_value(coreno, value, srv->msrv); - } + if (!err) + err = msr_set_core_value(coreno, value, srv->msrv); if (err) atomic_cas(&srv->err, 0, err); } @@ -89,11 +88,10 @@ static void msr_smp_write(void *opaque) uint64_t value; err = msr_get_core_address(coreno, swv->msra, &addr); - if (!err) { + if (!err) err = msr_get_core_value(coreno, swv->msrv, &value); - if (!err) - err = safe_write_msr(addr, value); - } + if (!err) + err = safe_write_msr(addr, value); if (err) atomic_cas(&swv->err, 0, err); } -- 2.7.0.rc3.207.g0ac5344 -- You received this message because you are subscribed to the Google Groups "Akaros" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/d/optout.
