RE: [PATCH] cxl/region: use %pap format to print resource_size_t

From: Dan Williams
Date: Tue Jan 02 2024 - 14:06:01 EST


Randy Dunlap wrote:
> 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 <rdunlap@xxxxxxxxxxxxx>
> Cc: Fan Ni <fan.ni@xxxxxxxxxxx>
> Cc: Davidlohr Bueso <dave@xxxxxxxxxxxx>
> Cc: Jonathan Cameron <jonathan.cameron@xxxxxxxxxx>
> Cc: Dave Jiang <dave.jiang@xxxxxxxxx>
> Cc: Alison Schofield <alison.schofield@xxxxxxxxx>
> Cc: Vishal Verma <vishal.l.verma@xxxxxxxxx>
> Cc: Ira Weiny <ira.weiny@xxxxxxxxx>
> Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
> Cc: linux-cxl@xxxxxxxxxxxxxxx
> ---
> drivers/cxl/core/region.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks Randy.