On Mon, Mar 20, 2017 at 06:06:36PM +0100, Marcin Wojtas wrote:
Leif,
2017-03-20 16:20 GMT+01:00 Leif Lindholm leif.lindholm@linaro.org:
UINT32 ComPhyMaxCount, Lane; @@ -1043,5 +1043,5 @@ ComPhyCp110Init ( Lane)); }
- return EFI_SUCCESS;
- return Status;
OK, so I never objected to this the first time around, but do we really want to return SUCCESS if processing invalid data? It doesn't even look like the return value is checked...
If you really don't care, make the function return void. If you do, set Status to EFI_UNSUPPORTED, EFI_NOT_FOUND or EFI_INVALID_PARAMETER on the default target of the switch as well.
I agree returning Status at the very end doesn't make much sense, so I'll remove it. For DEBUG build I'll add and assert in switch default and leave the rest as is -- each lane is initialized independently, so normally I prefer not to crash in case one of them fails. Is it ok for you?
Yeah, that's fine. It's just the current half-way house that looks weird.
/ Leif