Re: [PATCH v1 12/29] cxl: Modify address translation callback for generic use
From: Gregory Price
Date: Tue Jan 07 2025 - 13:45:08 EST
On Tue, Jan 07, 2025 at 03:09:58PM +0100, Robert Richter wrote:
> The root decoder address translation callback could be reused for
> other decoders too. For generic use of the callback, change the
> function interface to use a decoder argument instead of the root
> decoder.
>
> Signed-off-by: Robert Richter <rrichter@xxxxxxx>
> ---
> drivers/cxl/acpi.c | 4 ++--
> drivers/cxl/core/region.c | 2 +-
> drivers/cxl/cxl.h | 5 ++---
> 3 files changed, 5 insertions(+), 6 deletions(-)
>
... snip ...
> diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h
> index b3989dc58ed1..be7685fe8a23 100644
> --- a/drivers/cxl/cxl.h
> +++ b/drivers/cxl/cxl.h
> @@ -443,8 +443,7 @@ struct cxl_switch_decoder {
> struct cxl_dport *target[];
> };
>
> -struct cxl_root_decoder;
> -typedef u64 (*cxl_hpa_to_spa_fn)(struct cxl_root_decoder *cxlrd, u64 hpa);
> +typedef u64 (*cxl_to_hpa_fn)(struct cxl_decoder *cxld, u64 hpa);
>
changed from _to_spa to _to_hpa? Was the name wrong previously? Maybe at
least comment on this in the changelog.