Hi Julien, On 26 May 2017 at 19:12, Bhupinder Thakur <bhupinder.tha...@linaro.org> wrote: >>> + >>> + switch ( vpl011_reg ) >>> + { >>> + case DR: >> >> >> As mentioned above, you could do: >> >> { >> uint8_t ch; >> .... >> } >> >>> + vpl011_read_data(v->domain, &ch); >>> + *r = ch; >> >> >> Please use vreg_reg32_extract(...). >> > ok. > >>> + break; >> >> >> I admit I would prefer the "return 1;" here rather than "break;". This makes >> easier to follow the emulation for a given register. >> >> I would even be in favor of duplicating the "if ( !vpl011... )" in each case >> for the same reason.
Do you mean that I should repeat the vpl011_reg32_check_access() and return for each switch case? Regards, Bhupinder _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel