From: sashiko-bot@kernel.org
To: "Sergey Senozhatsky" <senozhatsky@chromium.org>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [RFC PATCH] perf/x86/intel: downgrade alloc_bts_buffer() WARN() to pr_err()
Date: Thu, 27 Aug 2026 07:02:25 +0000 [thread overview]
Message-ID: <20260827070225.EBBB41F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260827065529.3835720-1-senozhatsky@chromium.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Replacing `WARN_ONCE(1, ...)` with `pr_err_once(1, ...)` without removing the condition argument causes a build failure.
--
commit e234f9d8f1cd00344467d9d8095e6f5f291f3900
Author: Sergey Senozhatsky <senozhatsky@chromium.org>
perf/x86/intel: downgrade alloc_bts_buffer() WARN() to pr_err()
This commit downgrades the BTS buffer allocation failure warning from
WARN_ONCE to pr_err_once to prevent triggering fleet monitoring alarms
under memory pressure.
> diff --git a/arch/x86/events/intel/ds.c b/arch/x86/events/intel/ds.c
> index 91a093d8cf2e7..02ec21ebb7af2 100644
> --- a/arch/x86/events/intel/ds.c
> +++ b/arch/x86/events/intel/ds.c
> @@ -918,7 +918,7 @@ static int alloc_bts_buffer(int cpu)
>
> buffer = dsalloc_pages(BTS_BUFFER_SIZE, GFP_KERNEL | __GFP_NOWARN, cpu);
> if (unlikely(!buffer)) {
> - WARN_ONCE(1, "%s: BTS buffer allocation failure\n", __func__);
> + pr_err_once(1, "%s: BTS buffer allocation failure\n", __func__);
[Severity: Low]
Does this cause a build failure? Unlike WARN_ONCE which takes a condition
as its first argument, pr_err_once expects the format string as its first
argument. Leaving the integer 1 here will attempt to concatenate the KERN_ERR
macro string literal with an integer during expansion, which usually results
in a compile-time syntax error.
> return -ENOMEM;
> }
> hwev->ds_bts_vaddr = buffer;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260827065529.3835720-1-senozhatsky@chromium.org?part=1
prev parent reply other threads:[~2026-08-27 7:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 6:55 [RFC PATCH] perf/x86/intel: downgrade alloc_bts_buffer() WARN() to pr_err() Sergey Senozhatsky
2026-08-27 6:59 ` Sergey Senozhatsky
2026-08-27 10:20 ` Sergey Senozhatsky
2026-08-27 7:02 ` sashiko-bot [this message]
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=20260827070225.EBBB41F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=senozhatsky@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.