lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20211025200748.209510-1-quic_qiancai@quicinc.com>
Date:   Mon, 25 Oct 2021 16:07:48 -0400
From:   Qian Cai <quic_qiancai@...cinc.com>
To:     Steven Rostedt <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...hat.com>
CC:     <linux-kernel@...r.kernel.org>, Qian Cai <quic_qiancai@...cinc.com>
Subject: [PATCH] tracing: Fix a unused variable compiling warning

tracing_max_lat_fops is only used when LATENCY_FS_NOTIFY is set. Otherwise,
W=1 compiling could generate a warning.

kernel/trace/trace.c:1668:37: warning: 'tracing_max_lat_fops' defined but
not used [-Wunused-const-variable=]
 1668 | static const struct file_operations tracing_max_lat_fops;
      |                                     ^~~~~~~~~~~~~~~~~~~~

Fixes: 6880c987e451 ("tracing: Add LATENCY_FS_NOTIFY to define if latency_fsnotify() is defined")
Signed-off-by: Qian Cai <quic_qiancai@...cinc.com>
---
 kernel/trace/trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index c88bbfe75d1d..7f0801662a6b 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1665,10 +1665,10 @@ static ssize_t trace_seq_to_buffer(struct trace_seq *s, void *buf, size_t cnt)
 }
 
 unsigned long __read_mostly	tracing_thresh;
-static const struct file_operations tracing_max_lat_fops;
 
 #ifdef LATENCY_FS_NOTIFY
 
+static const struct file_operations tracing_max_lat_fops;
 static struct workqueue_struct *fsnotify_wq;
 
 static void latency_fsnotify_workfn(struct work_struct *work)
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ