Skip to content

Commit a223ce1

Browse files
Dan Carpenterdavejiang
authored andcommitted
cxl/hdm: Clean up a debug printk
Smatch complains that %pa is for phys_addr_t types and "size" is a u64. drivers/cxl/core/hdm.c:521 cxl_dpa_alloc() error: '%pa' expects argument of type 'phys_addr_t*', argument 4 has type 'ullong* Looking at this, to me it seems more useful to print the sizes as decimal instead of hex. Let's do that. [dj: Adjusted based on latest code changes. ] Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Fan Ni <fan.ni@samsung.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Link: https://patch.msgid.link/3d3d969d-651d-4e9d-a892-900876a60ab5@moroto.mountain Signed-off-by: Dave Jiang <dave.jiang@intel.com>
1 parent 68d8b4f commit a223ce1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

drivers/cxl/core/core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void __iomem *devm_cxl_iomap_block(struct device *dev, resource_size_t addr,
7676
struct dentry *cxl_debugfs_create_dir(const char *dir);
7777
int cxl_dpa_set_part(struct cxl_endpoint_decoder *cxled,
7878
enum cxl_partition_mode mode);
79-
int cxl_dpa_alloc(struct cxl_endpoint_decoder *cxled, unsigned long long size);
79+
int cxl_dpa_alloc(struct cxl_endpoint_decoder *cxled, u64 size);
8080
int cxl_dpa_free(struct cxl_endpoint_decoder *cxled);
8181
resource_size_t cxl_dpa_size(struct cxl_endpoint_decoder *cxled);
8282
resource_size_t cxl_dpa_resource_start(struct cxl_endpoint_decoder *cxled);

drivers/cxl/core/hdm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ int cxl_dpa_set_part(struct cxl_endpoint_decoder *cxled,
604604
return 0;
605605
}
606606

607-
static int __cxl_dpa_alloc(struct cxl_endpoint_decoder *cxled, unsigned long long size)
607+
static int __cxl_dpa_alloc(struct cxl_endpoint_decoder *cxled, u64 size)
608608
{
609609
struct cxl_memdev *cxlmd = cxled_to_memdev(cxled);
610610
struct cxl_dev_state *cxlds = cxlmd->cxlds;
@@ -667,15 +667,15 @@ static int __cxl_dpa_alloc(struct cxl_endpoint_decoder *cxled, unsigned long lon
667667
skip = res->start - skip_start;
668668

669669
if (size > avail) {
670-
dev_dbg(dev, "%pa exceeds available %s capacity: %pa\n", &size,
671-
res->name, &avail);
670+
dev_dbg(dev, "%llu exceeds available %s capacity: %llu\n", size,
671+
res->name, (u64)avail);
672672
return -ENOSPC;
673673
}
674674

675675
return __cxl_dpa_reserve(cxled, start, size, skip);
676676
}
677677

678-
int cxl_dpa_alloc(struct cxl_endpoint_decoder *cxled, unsigned long long size)
678+
int cxl_dpa_alloc(struct cxl_endpoint_decoder *cxled, u64 size)
679679
{
680680
struct cxl_port *port = cxled_to_port(cxled);
681681
int rc;

0 commit comments

Comments
 (0)