]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tools/rtla: Fix unassigned nr_cpus
authorCosta Shulyupin <costa.shul@redhat.com>
Thu, 2 Oct 2025 17:08:45 +0000 (20:08 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:03:07 +0000 (14:03 +0100)
commitefdb8e298907639746a283eefd699e4bfd94c100
tree581bc5788c732961de618436a15eacdb430e60aa
parenta6fb8785b1796c42728cf7498cb045772efd7af6
tools/rtla: Fix unassigned nr_cpus

[ Upstream commit b4275b23010df719ec6508ddbc84951dcd24adce ]

In recently introduced timerlat_free(),
the variable 'nr_cpus' is not assigned.

Assign it with sysconf(_SC_NPROCESSORS_CONF) as done elsewhere.
Remove the culprit: -Wno-maybe-uninitialized. The rest of the
code is clean.

Signed-off-by: Costa Shulyupin <costa.shul@redhat.com>
Reviewed-by: Tomas Glozar <tglozar@redhat.com>
Fixes: 2f3172f9dd58 ("tools/rtla: Consolidate code between osnoise/timerlat and hist/top")
Link: https://lore.kernel.org/r/20251002170846.437888-1-costa.shul@redhat.com
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/tracing/rtla/Makefile.rtla
tools/tracing/rtla/src/timerlat.c