Skip to content

Commit 47f06eb

Browse files
nathanchancewilldeacon
authored andcommitted
perf/arm-cmn: Fix resource_size_t printk specifier in arm_cmn_init_dtc()
When building for 32-bit ARM, there is a warning when using the %llx specifier to print a resource_size_t variable: drivers/perf/arm-cmn.c: In function 'arm_cmn_init_dtc': drivers/perf/arm-cmn.c:2149:73: error: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'resource_size_t' {aka 'unsigned int'} [-Werror=format=] 2149 | "Failed to request DTC region 0x%llx\n", base); | ~~~^ ~~~~ | | | | | resource_size_t {aka unsigned int} | long long unsigned int | %x Use the %pa specifier to handle the possible sizes of phys_addr_t properly. This requires passing the variable by reference. Fixes: 5394396 ("perf/arm-cmn: Stop claiming entire iomem region") Signed-off-by: Nathan Chancellor <[email protected]> Reviewed-by: Robin murphy <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent d49802b commit 47f06eb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/perf/arm-cmn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2146,7 +2146,7 @@ static int arm_cmn_init_dtc(struct arm_cmn *cmn, struct arm_cmn_node *dn, int id
21462146
size = cmn->part == PART_CMN600 ? SZ_16K : SZ_64K;
21472147
if (!devm_request_mem_region(cmn->dev, base, size, dev_name(cmn->dev)))
21482148
return dev_err_probe(cmn->dev, -EBUSY,
2149-
"Failed to request DTC region 0x%llx\n", base);
2149+
"Failed to request DTC region 0x%pa\n", &base);
21502150

21512151
writel_relaxed(CMN_DT_DTC_CTL_DT_EN, dtc->base + CMN_DT_DTC_CTL);
21522152
writel_relaxed(CMN_DT_PMCR_PMU_EN | CMN_DT_PMCR_OVFL_INTR_EN, CMN_DT_PMCR(dtc));

0 commit comments

Comments
 (0)