Re: [PATCH 2/3] cxl/pci: cxl_dport_map_rch_aer() cleanup

Jonathan Cameron
2024-08-27T15:00:21Z

On Tue, 27 Aug 2024 04:57:54 +0000
Li Ming <ming4.li@intel.com> wrote:

> cxl_dport_map_ras() is used to map CXL RAS capability, the RCH AER
> capability should not be mapped in the function but should mapped in
> cxl_dport_init_aer(). Moving cxl_dport_map_ras() out of
> cxl_dport_map_ras() and into cxl_dport_init_aer().
>
> In cxl_dport_init_aer(), the AER capability position in RCRB will be
> located but the position is only used in cxl_dport_map_rch_aer(),
> getting the position in cxl_dport_map_rch_aer() rather than
> cxl_dport_init_aer() is more reasonable and makes the code clearer.
>
> Besides, some local variables in cxl_dport_map_rch_aer() are
> unnecessary, remove them to make the function more concise.
>
> Signed-off-by: Li Ming <ming4.li@intel.com>
Seems sensible
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>