]> Git Repo - linux.git/commitdiff
cxl/region: use %pap format to print resource_size_t
authorRandy Dunlap <[email protected]>
Tue, 2 Jan 2024 17:39:17 +0000 (09:39 -0800)
committerDan Williams <[email protected]>
Tue, 2 Jan 2024 19:02:49 +0000 (11:02 -0800)
Use "%pap" to print a resource_size_t (phys_addr_t derived type)
to prevent build warnings on 32-bit arches (seen on i386 and
riscv-32).

../drivers/cxl/core/region.c: In function 'alloc_hpa':
../drivers/cxl/core/region.c:556:25: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 5 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
  556 |                         "HPA allocation error (%ld) for size:%#llx in %s %pr\n",

Fixes: 7984d22f1315 ("cxl/region: Add dev_dbg() detail on failure to allocate HPA space")
Signed-off-by: Randy Dunlap <[email protected]>
Cc: Fan Ni <[email protected]>
Cc: Davidlohr Bueso <[email protected]>
Cc: Jonathan Cameron <[email protected]>
Cc: Dave Jiang <[email protected]>
Cc: Alison Schofield <[email protected]>
Cc: Vishal Verma <[email protected]>
Cc: Ira Weiny <[email protected]>
Cc: Dan Williams <[email protected]>
Cc: <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dan Williams <[email protected]>
drivers/cxl/core/region.c

index d904f9752bc38ae8b81fc84ff1ef9767de5abe73..0e88f1aed01847561b5ec86656754f278cfe58d1 100644 (file)
@@ -553,8 +553,8 @@ static int alloc_hpa(struct cxl_region *cxlr, resource_size_t size)
                                    dev_name(&cxlr->dev));
        if (IS_ERR(res)) {
                dev_dbg(&cxlr->dev,
-                       "HPA allocation error (%ld) for size:%#llx in %s %pr\n",
-                       PTR_ERR(res), size, cxlrd->res->name, cxlrd->res);
+                       "HPA allocation error (%ld) for size:%pap in %s %pr\n",
+                       PTR_ERR(res), &size, cxlrd->res->name, cxlrd->res);
                return PTR_ERR(res);
        }
 
This page took 0.060069 seconds and 4 git commands to generate.