]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
cxl: Fix warning from emitting resource_size_t as long long int on 32bit systems
authorDave Jiang <dave.jiang@intel.com>
Fri, 28 Feb 2025 20:47:39 +0000 (13:47 -0700)
committerDave Jiang <dave.jiang@intel.com>
Fri, 14 Mar 2025 23:27:54 +0000 (16:27 -0700)
Reported by kernel test bot from an ARM build:
drivers/cxl/core/region.c:3263:26: warning: format '%lld' expects argument of type 'long long int', but argument 3 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]

On a 32bit system, resource_size_t is defined as 32bit long vs on a 64bit
system it is defined as 64bit long. Use %pa format to deal with
resource_size_t.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202503010252.mIDhZ5kY-lkp@intel.com/
Fixes: 0ec9849b6333 ("acpi/hmat / cxl: Add extended linear cache support for CXL")
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Link: https://patch.msgid.link/20250228204739.3849309-1-dave.jiang@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/cxl/core/region.c

index 80ba19cf30945367c1cccf7d2721bd407b12e843..a09ae21a26c6e3eb8b263788e3bf30691520ab82 100644 (file)
@@ -3251,8 +3251,8 @@ static int cxl_extended_linear_cache_resize(struct cxl_region *cxlr,
 
        if (size != cache_size) {
                dev_warn(&cxlr->dev,
-                        "Extended Linear Cache size %lld != CXL size %lld. No Support!",
-                        cache_size, size);
+                        "Extended Linear Cache size %pa != CXL size %pa. No Support!",
+                        &cache_size, &size);
                return -EOPNOTSUPP;
        }