Re: [PATCH 6/7] cxl/mem: Create a helper to setup device regs

From: Dan Williams
Date: Thu Apr 15 2021 - 18:54:23 EST


On Wed, Apr 7, 2021 at 3:26 PM Ben Widawsky <ben.widawsky@xxxxxxxxx> wrote:
>
> Memory devices have a list of required register regions within the
> register block, but this isn't required of all CXL components or
> devices. To make things more tidy, and allow for easily setting up other
> block types in this loop, the helper is introduced.

I don't understand the point of this or the organization choice.
cxl_setup_device_regs() *is* the core implementation so there
shouldn't be a "__" prefixed version wrapping it. I agree that some
users will not care that some of the device registers are not found,
but that won't be cxl_mem_setup_regs() making that call.