]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
perf/arm-cmn: Fix resource_size_t printk specifier in arm_cmn_init_dtc()
authorNathan Chancellor <nathan@kernel.org>
Thu, 26 Mar 2026 02:19:26 +0000 (19:19 -0700)
committerWill Deacon <will@kernel.org>
Thu, 26 Mar 2026 15:25:21 +0000 (15:25 +0000)
commit47f06ebbe8dad695002e5d9a2ab436411f88e985
tree58a0de6a87c8521253910a5bd9973d8fb29a02a4
parentd49802b6617b96f55d4b61fed81f4cc43858ed3f
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>
drivers/perf/arm-cmn.c