Re: [PATCH v2 2/4] hw/cxl: Use switch statements for read and write of cachemem registers

2023-09-18 Thread Fan Ni
On Fri, Sep 15, 2023 at 06:04:16PM +0100, Jonathan Cameron wrote: > Establishing that only register accesses of size 4 and 8 can occur > using these functions requires looking at their callers. Make it > easier to see that by using switch statements. > Assertions are used to enforce that the regis

[PATCH v2 2/4] hw/cxl: Use switch statements for read and write of cachemem registers

2023-09-15 Thread Jonathan Cameron via
Establishing that only register accesses of size 4 and 8 can occur using these functions requires looking at their callers. Make it easier to see that by using switch statements. Assertions are used to enforce that the register storage is of the matching size, allowing fixed values to be used for d