public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Nathan Chancellor <nathan@kernel.org>,
	Will Deacon <will@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Ilkka Koskinen <ilkka@os.amperecomputing.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf/arm-cmn: Fix resource_size_t printk specifier in arm_cmn_init_dtc()
Date: Thu, 26 Mar 2026 10:40:15 +0000	[thread overview]
Message-ID: <45fbd3d2-4c46-49ce-9d19-38b247ad7388@arm.com> (raw)
In-Reply-To: <20260325-perf-arm-cmn-fix-resource_size_t-format-v1-1-e84d52ee3e81@kernel.org>

On 2026-03-26 2:19 am, Nathan Chancellor wrote:
> 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.

Cheers Nathan! I had seen the kbuild robot reports last night, and was 
going to get to this today, but I'm more than happy to be beaten to it!

Reviewed-by: Robin murphy <robin.murphy@arm.com>

> Fixes: 5394396ff548 ("perf/arm-cmn: Stop claiming entire iomem region")
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
>   drivers/perf/arm-cmn.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
> index 1ac91cda6780..5c727c2abaf0 100644
> --- a/drivers/perf/arm-cmn.c
> +++ b/drivers/perf/arm-cmn.c
> @@ -2146,7 +2146,7 @@ static int arm_cmn_init_dtc(struct arm_cmn *cmn, struct arm_cmn_node *dn, int id
>   	size = cmn->part == PART_CMN600 ? SZ_16K : SZ_64K;
>   	if (!devm_request_mem_region(cmn->dev, base, size, dev_name(cmn->dev)))
>   		return dev_err_probe(cmn->dev, -EBUSY,
> -				     "Failed to request DTC region 0x%llx\n", base);
> +				     "Failed to request DTC region 0x%pa\n", &base);
>   
>   	writel_relaxed(CMN_DT_DTC_CTL_DT_EN, dtc->base + CMN_DT_DTC_CTL);
>   	writel_relaxed(CMN_DT_PMCR_PMU_EN | CMN_DT_PMCR_OVFL_INTR_EN, CMN_DT_PMCR(dtc));
> 
> ---
> base-commit: 2f89b7f78c50ca973ca035ceb30426f78d9e0996
> change-id: 20260325-perf-arm-cmn-fix-resource_size_t-format-b01795e36e60
> 
> Best regards,
> --
> Nathan Chancellor <nathan@kernel.org>
> 


  reply	other threads:[~2026-03-26 10:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-26  2:19 [PATCH] perf/arm-cmn: Fix resource_size_t printk specifier in arm_cmn_init_dtc() Nathan Chancellor
2026-03-26 10:40 ` Robin Murphy [this message]
2026-03-26 15:34 ` Will Deacon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45fbd3d2-4c46-49ce-9d19-38b247ad7388@arm.com \
    --to=robin.murphy@arm.com \
    --cc=ilkka@os.amperecomputing.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=nathan@kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox