lkml.org 
[lkml]   [2023]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] perf/x86/p4: Fix "Wunused-but-set-variable" warning
This fixes a compiler warning when compiling an allyesconfig with W=1:
warning: variable ´high´ set but not used [-Wunused-but-set-variable]

Signed-off-by: Lucy Mielke <lucymielke@icloud.com>
---
arch/x86/events/intel/p4.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/events/intel/p4.c b/arch/x86/events/intel/p4.c
index 35936188db01..69aaf7c0f340 100644
--- a/arch/x86/events/intel/p4.c
+++ b/arch/x86/events/intel/p4.c
@@ -1366,7 +1366,7 @@ static __initconst const struct x86_pmu p4_pmu = {

__init int p4_pmu_init(void)
{
- unsigned int low, high;
+ unsigned int low, __maybe_unused high;
int i, reg;

/* If we get stripped -- indexing fails */
--
2.42.0
\
 
 \ /
  Last update: 2023-10-07 20:56    [W:0.060 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site