linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] event/core.c: fix warning format specifier to use %llu instead of %lld for u64 values.
@ 2025-07-29  7:06 Ryan Chung
  2025-08-14 15:40 ` Ryan Chung
  0 siblings, 1 reply; 2+ messages in thread
From: Ryan Chung @ 2025-07-29  7:06 UTC (permalink / raw)
  To: peterz, mingo, acme, namhyung
  Cc: mark.rutland, alexander.shishkin, jolsa, irogers, adrian.hunter,
	kan.liang, linux-perf-users, linux-kernel, Ryan Chung

Updates the perf duration warning to use the unsigned 64‑bit format specifier `%llu` instead of `%lld`, ensuring the format matches the `u64` types.

No functional change intended.

Signed-off-by: Ryan Chung <seokwoo.chung130@gmail.com>
---
 kernel/events/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index 22fdf0c187cd..b8d7c4a64c44 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -602,7 +602,7 @@ static u64 __report_allowed;
 static void perf_duration_warn(struct irq_work *w)
 {
 	printk_ratelimited(KERN_INFO
-		"perf: interrupt took too long (%lld > %lld), lowering "
+		"perf: interrupt took too long (%llu > %llu), lowering "
 		"kernel.perf_event_max_sample_rate to %d\n",
 		__report_avg, __report_allowed,
 		sysctl_perf_event_sample_rate);
@@ -655,7 +655,7 @@ void perf_sample_event_took(u64 sample_len_ns)
 	perf_sample_period_ns = NSEC_PER_SEC / sysctl_perf_event_sample_rate;
 
 	if (!irq_work_queue(&perf_duration_work)) {
-		early_printk("perf: interrupt took too long (%lld > %lld), lowering "
+		early_printk("perf: interrupt took too long (%llu > %llu), lowering "
 			     "kernel.perf_event_max_sample_rate to %d\n",
 			     __report_avg, __report_allowed,
 			     sysctl_perf_event_sample_rate);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] event/core.c: fix warning format specifier to use %llu instead of %lld for u64 values.
  2025-07-29  7:06 [PATCH] event/core.c: fix warning format specifier to use %llu instead of %lld for u64 values Ryan Chung
@ 2025-08-14 15:40 ` Ryan Chung
  0 siblings, 0 replies; 2+ messages in thread
From: Ryan Chung @ 2025-08-14 15:40 UTC (permalink / raw)
  To: peterz, mingo, acme, namhyung
  Cc: mark.rutland, alexander.shishkin, jolsa, irogers, adrian.hunter,
	kan.liang, linux-perf-users, linux-kernel

Hi all,

Just wondering if there’s any feedback on this patch.

Thanks,
Ryan Chung

On Tue, Jul 29, 2025 at 04:06:03PM +0900, Ryan Chung wrote:
> Updates the perf duration warning to use the unsigned 64‑bit format specifier `%llu` instead of `%lld`, ensuring the format matches the `u64` types.
> 
> No functional change intended.
> 
> Signed-off-by: Ryan Chung <seokwoo.chung130@gmail.com>
> ---
>  kernel/events/core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index 22fdf0c187cd..b8d7c4a64c44 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -602,7 +602,7 @@ static u64 __report_allowed;
>  static void perf_duration_warn(struct irq_work *w)
>  {
>  	printk_ratelimited(KERN_INFO
> -		"perf: interrupt took too long (%lld > %lld), lowering "
> +		"perf: interrupt took too long (%llu > %llu), lowering "
>  		"kernel.perf_event_max_sample_rate to %d\n",
>  		__report_avg, __report_allowed,
>  		sysctl_perf_event_sample_rate);
> @@ -655,7 +655,7 @@ void perf_sample_event_took(u64 sample_len_ns)
>  	perf_sample_period_ns = NSEC_PER_SEC / sysctl_perf_event_sample_rate;
>  
>  	if (!irq_work_queue(&perf_duration_work)) {
> -		early_printk("perf: interrupt took too long (%lld > %lld), lowering "
> +		early_printk("perf: interrupt took too long (%llu > %llu), lowering "
>  			     "kernel.perf_event_max_sample_rate to %d\n",
>  			     __report_avg, __report_allowed,
>  			     sysctl_perf_event_sample_rate);
> -- 
> 2.43.0
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-08-14 15:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-29  7:06 [PATCH] event/core.c: fix warning format specifier to use %llu instead of %lld for u64 values Ryan Chung
2025-08-14 15:40 ` Ryan Chung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).