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

Jonathan Cameron
2024-03-25T17:46:15Z

On Sun, 24 Mar 2024 16:18:08 -0700
Ira Weiny <ira.weiny@intel.com> 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@intel.com>

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@huawei.com>