From: sashiko-bot@kernel.org
To: "Florian Fainelli" <florian.fainelli@broadcom.com>
Cc: linux-perf-users@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH stable 6.1 3/3] perf build: Disable fewer bison warnings
Date: Tue, 19 May 2026 19:54:03 +0000 [thread overview]
Message-ID: <20260519195403.A40F01F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260519185154.2987285-4-florian.fainelli@broadcom.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The updated `sed` regex for parsing the bison version strictly requires three numeric components, causing a shell syntax error for two-component versions.
--
commit e696603d6c95e1ec405be3442c49513276f5ee86
Author: Ian Rogers <irogers@google.com>
perf build: Disable fewer bison warnings
This commit reduces the number of disabled bison C warnings for bison versions
3.8.2 and later. It also avoids implicit declarations of yylex by adding
declarations directly in the C files.
Link: https://lore.kernel.org/r/20230728064917.767761-6-irogers@google.com
> diff --git a/tools/perf/util/Build b/tools/perf/util/Build
> index e315ecaec3233..b65ce3563bedd 100644
> --- a/tools/perf/util/Build
> +++ b/tools/perf/util/Build
> @@ -269,10 +269,14 @@ CFLAGS_parse-events-flex.o += $(flex_flags)
> CFLAGS_pmu-flex.o += $(flex_flags)
> CFLAGS_expr-flex.o += $(flex_flags)
>
> -bison_flags := -DYYENABLE_NLS=0
> -BISON_GE_35 := $(shell expr $(shell $(BISON) --version | grep bison | sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\)/\1\2/g') \>\= 35)
> -ifeq ($(BISON_GE_35),1)
> - bison_flags += -Wno-unused-parameter -Wno-nested-externs -Wno-implicit-function-declaration -Wno-switch-enum -Wno-unused-but-set-variable -Wno-unknown-warning-option
> +# Some newer clang and gcc version complain about this
> +# util/parse-events-bison.c:1317:9: error: variable 'parse_events_nerrs' set but not used [-Werror,-Wunused-but-set-variable]
> +# int yynerrs = 0;
> +
> +bison_flags := -DYYENABLE_NLS=0 -Wno-unused-but-set-variable
> +BISON_GE_382 := $(shell expr $(shell $(BISON) --version | grep bison | sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/\1\2\3/g') \>\= 382)
[Severity: Low]
Will this new regex cause shell syntax errors for two-component version
strings like "bison (GNU Bison) 3.8"?
If the sed pattern strictly requires three numeric components, it will
fail to match a two-component string and output the unmodified string
instead.
When make passes this raw string containing unescaped parentheses
to expr, it will cause the shell to abort with a syntax error like
'sh: Syntax error: "(" unexpected' and fail the version check.
> +ifeq ($(BISON_GE_382),1)
> + bison_flags += -Wno-switch-enum
> else
> bison_flags += -w
> endif
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260519185154.2987285-1-florian.fainelli@broadcom.com?part=3
next prev parent reply other threads:[~2026-05-19 19:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 18:51 [PATCH stable 6.1 0/3] perf build fixes Florian Fainelli
2026-05-19 18:51 ` [PATCH stable 6.1 1/3] perf build: Conditionally define NDEBUG Florian Fainelli
2026-05-19 19:23 ` sashiko-bot
2026-05-19 18:51 ` [PATCH stable 6.1 2/3] perf parse-events: Make YYDEBUG dependent on doing a debug build Florian Fainelli
2026-05-19 18:51 ` [PATCH stable 6.1 3/3] perf build: Disable fewer bison warnings Florian Fainelli
2026-05-19 19:54 ` sashiko-bot [this message]
2026-05-19 18:55 ` [PATCH stable 6.1 0/3] perf build fixes Ian Rogers
2026-05-19 19:29 ` Florian Fainelli
2026-05-20 14:31 ` Sasha Levin
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=20260519195403.A40F01F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=florian.fainelli@broadcom.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.