From: Robin Murphy <robin.murphy@arm.com>
To: Will Deacon <will@kernel.org>, kernel test robot <lkp@intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, nd@arm.com
Subject: Re: [arm-perf:for-next/perf 6/8] drivers/perf/arm-ni.c:433:13: warning: operator '?:' has lower precedence than '+'; '+' will be evaluated first
Date: Tue, 4 Nov 2025 13:26:11 +0000 [thread overview]
Message-ID: <5bba40c3-bfab-481d-8252-4f5a62e2b79e@arm.com> (raw)
In-Reply-To: <aQnzF7BNIgp37kcd@willie-the-truck>
On 2025-11-04 12:35 pm, Will Deacon wrote:
> On Tue, Nov 04, 2025 at 05:43:40PM +0800, kernel test robot wrote:
>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git for-next/perf
>> head: 989b40b7578a2be7b0388522d33d751b257d59d9
>> commit: 8fa08f8835e57e1fd5e2994c9cf76c84dadc1235 [6/8] perf/arm-ni: Add NoC S3 support
>> config: sparc64-randconfig-002-20251104 (https://download.01.org/0day-ci/archive/20251104/202511041749.ok8zDP6u-lkp@intel.com/config)
>> compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project d2625a438020ad35330cda29c3def102c1687b1b)
>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251104/202511041749.ok8zDP6u-lkp@intel.com/reproduce)
>>
>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
>> the same patch/commit), kindly add following tags
>> | Reported-by: kernel test robot <lkp@intel.com>
>> | Closes: https://lore.kernel.org/oe-kbuild-all/202511041749.ok8zDP6u-lkp@intel.com/
>>
>> All warnings (new ones prefixed by >>):
>>
>>>> drivers/perf/arm-ni.c:433:13: warning: operator '?:' has lower precedence than '+'; '+' will be evaluated first [-Wparentheses]
>> 432 | hw->event_base = (unsigned long)cd->pmu_base +
>> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> 433 | is_7xx ? NI700_PMCCNTR_L : NI_PMCCNTR_L;
>> | ~~~~~~ ^
>> drivers/perf/arm-ni.c:433:13: note: place parentheses around the '+' expression to silence this warning
>> 432 | hw->event_base = (unsigned long)cd->pmu_base +
>> | (
>> 433 | is_7xx ? NI700_PMCCNTR_L : NI_PMCCNTR_L;
>> | ^
>> | )
>
> Hrm. Doesn't that mean this is completely broken or am I misreading the
> report?
Bah, my arm64 W=1 build (which I did do in the hope of catching any such
sillies...) fails to flag that :(
Truth is this is a fresh refactoring of the mess I originally wrote that
got tested by someone else 18 months ago, and I don't have any hardware
to functionally test it myself. Feel free to drop it and I'll send a
complete v2, or I can do an incremental fix if you prefer (I already
realised I could have streamlined the version check to a one-off in
event_init as well.)
Cheers,
Robin.
next prev parent reply other threads:[~2025-11-04 13:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-04 9:43 [arm-perf:for-next/perf 6/8] drivers/perf/arm-ni.c:433:13: warning: operator '?:' has lower precedence than '+'; '+' will be evaluated first kernel test robot
2025-11-04 12:35 ` Will Deacon
2025-11-04 13:26 ` Robin Murphy [this message]
2025-11-04 13:32 ` Will Deacon
2025-11-04 14:04 ` Robin Murphy
2025-11-04 18:24 ` Will Deacon
2025-11-04 18:36 ` Robin Murphy
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=5bba40c3-bfab-481d-8252-4f5a62e2b79e@arm.com \
--to=robin.murphy@arm.com \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=nd@arm.com \
--cc=oe-kbuild-all@lists.linux.dev \
--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