Re: [PATCH 05/26] cxl/core: Simplify cxl_dpa_set_mode()

From: Jonathan Cameron
Date: Mon Mar 25 2024 - 14:17:13 EST


On Sun, 24 Mar 2024 16:18:08 -0700
Ira Weiny <ira.weiny@xxxxxxxxx> wrote:

> cxl_dpa_set_mode() checks the mode for validity two times, once outside
> of the DPA RW semaphore and again within. The function is not in a
> critical path. Prior to Dynamic Capacity the extra check was not much
> of an issue. The addition of DC modes increases the complexity of
> the check.
>
> Simplify the mode check before adding the more complex DC modes.
>
> Signed-off-by: Ira Weiny <ira.weiny@xxxxxxxxx>

Nice. Maybe drag this earlier in series so it could potentially be
picked up as a cleanup? Same with patch 2 potentially.
If Dave is fine with doing that sort of precursor patches going
earlier, it will save carrying quite so many in this series for
future versions (and make it look less terrifying :)

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>