On 11/1/23 15:24, Jonathan Cameron via wrote:
From: Gregory Price <gourry.memve...@gmail.com>

Remove usage of magic numbers when accessing capacity fields and replace
with CXL_CAPACITY_MULTIPLIER, matching the kernel definition.

Signed-off-by: Gregory Price <gregory.pr...@memverge.com>
Reviewed-by: Davidlohr Bueso <d...@stgolabs.net>
Signed-off-by: Jonathan Cameron <jonathan.came...@huawei.com>
---
  hw/cxl/cxl-mailbox-utils.c | 14 ++++++++------
  1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-utils.c
index bc1bb18844..942de73bbc 100644
--- a/hw/cxl/cxl-mailbox-utils.c
+++ b/hw/cxl/cxl-mailbox-utils.c
@@ -14,6 +14,8 @@
  #include "qemu/log.h"
  #include "qemu/uuid.h"
+#define CXL_CAPACITY_MULTIPLIER 0x10000000 /* SZ_256M */

Do you mind changing to the self-documenting (256 * MiB) ?

Reply via email to