summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorAldo Conte <aldocontelk@gmail.com>2026-03-20 12:23:02 +0100
committerPeter Zijlstra <peterz@infradead.org>2026-03-24 15:11:42 +0100
commit6ee26b7a224b27aa7e8e1ee8a845a31664d2e97c (patch)
treed7d006a068f855ef9378cb3d54a4b64cafe61d36 /tools/perf/scripts/python/stackcollapse.py
parentb191aa32be2c960ca2391b40e862c389230cadef (diff)
perf/x86/intel/p4: Fix unused variable warning in p4_pmu_init()
Build the kernel with make W=1 generates the following warning: arch/x86/events/intel/p4.c: In function ‘p4_pmu_init’: arch/x86/events/intel/p4.c:1370:27: error: variable ‘high’ set but not used [-Werror=unused-but-set-variable] 1370 | unsigned int low, high; | ^~~~ This happens because, although both variables are declared and initialized by rdmsr, only `low` is used in the subsequent if statement. This patch uses the rdmsrq() macro instead of the rdmsr() macro. The rdmsrq() macro avoids the use of high and low variables because it reads the msr value in a single u64 variable. Also, replace (1 << 7) with the proper macro. Running `make W=1` again resolves the error. I was unable to test the patch because i do not have the hardware. Suggested-by: Dave Hansen <dave.hansen@linux.intel.com> Signed-off-by: Aldo Conte <aldocontelk@gmail.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://patch.msgid.link/20260320112302.281549-1-aldocontelk@gmail.com
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions