Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 5394396ff548 ("perf/arm-cmn: Stop claiming entire iomem region")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Robin murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>

authored by

Nathan Chancellor and committed by
Will Deacon
47f06ebb d49802b6

+1 -1
+1 -1
drivers/perf/arm-cmn.c
··· 2146 2146 size = cmn->part == PART_CMN600 ? SZ_16K : SZ_64K; 2147 2147 if (!devm_request_mem_region(cmn->dev, base, size, dev_name(cmn->dev))) 2148 2148 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); 2150 2150 2151 2151 writel_relaxed(CMN_DT_DTC_CTL_DT_EN, dtc->base + CMN_DT_DTC_CTL); 2152 2152 writel_relaxed(CMN_DT_PMCR_PMU_EN | CMN_DT_PMCR_OVFL_INTR_EN, CMN_DT_PMCR(dtc));