Skip to content

Commit 58f1e9d

Browse files
rddunlapdjbw
authored andcommitted
cxl/region: use %pap format to print resource_size_t
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: 7984d22 ("cxl/region: Add dev_dbg() detail on failure to allocate HPA space") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Fan Ni <fan.ni@samsung.com> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: Jonathan Cameron <jonathan.cameron@huawei.com> Cc: Dave Jiang <dave.jiang@intel.com> Cc: Alison Schofield <alison.schofield@intel.com> Cc: Vishal Verma <vishal.l.verma@intel.com> Cc: Ira Weiny <ira.weiny@intel.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: <linux-cxl@vger.kernel.org> Link: https://lore.kernel.org/r/20240102173917.19718-1-rdunlap@infradead.org Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent 7984d22 commit 58f1e9d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/cxl/core/region.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,8 +553,8 @@ static int alloc_hpa(struct cxl_region *cxlr, resource_size_t size)
553553
dev_name(&cxlr->dev));
554554
if (IS_ERR(res)) {
555555
dev_dbg(&cxlr->dev,
556-
"HPA allocation error (%ld) for size:%#llx in %s %pr\n",
557-
PTR_ERR(res), size, cxlrd->res->name, cxlrd->res);
556+
"HPA allocation error (%ld) for size:%pap in %s %pr\n",
557+
PTR_ERR(res), &size, cxlrd->res->name, cxlrd->res);
558558
return PTR_ERR(res);
559559
}
560560

0 commit comments

Comments
 (0)