|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v4 2/2] xen/arm: vpl011: drop extra return in vpl011_mmio_read
Hi, On 01/12/2022 09:04, Jiamei Xie wrote: In vpl011_mmio_read switch block, all cases have a return. So the outside one can be removed. That's correct today. However, if tomorrow we add a new case and forgot to add the return, then ...
... we would end up to clobber the register. This is far from idea. So was this change made because the compiler complained? If not, then I would prefer if we keep "return 1" and maybe add ASSERT_UNREACHABLE() to catch case where the return is not added. Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |