]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
cxl/region: fix format string for resource_size_t
authorArnd Bergmann <arnd@arndb.de>
Thu, 4 Dec 2025 09:52:26 +0000 (10:52 +0100)
committerDave Jiang <dave.jiang@intel.com>
Tue, 6 Jan 2026 01:12:06 +0000 (18:12 -0700)
The size of this type is architecture specific, and the recommended
way to print it portably is through the custom %pap format string.

Fixes: d6602e25819d ("cxl/region: Add support to indicate region has extended linear cache")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>> ---
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Link: https://patch.msgid.link/20251204095237.1032528-1-arnd@kernel.org
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/cxl/core/region.c

index ae899f68551f743312077eaa3996ffac1d4ba134..fc36a5413d3f7aaf095a1cc3b75951a8bd948f67 100644 (file)
@@ -759,7 +759,7 @@ static ssize_t extended_linear_cache_size_show(struct device *dev,
        ACQUIRE(rwsem_read_intr, rwsem)(&cxl_rwsem.region);
        if ((rc = ACQUIRE_ERR(rwsem_read_intr, &rwsem)))
                return rc;
-       return sysfs_emit(buf, "%#llx\n", p->cache_size);
+       return sysfs_emit(buf, "%pap\n", &p->cache_size);
 }
 static DEVICE_ATTR_RO(extended_linear_cache_size);