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]
Date:   Fri, 16 Apr 2021 19:43:00 +0000
From:   Carlos Llamas <cmllamas@...gle.com>
To:     Peter Zijlstra <peterz@...radead.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Jason Baron <jbaron@...mai.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ard Biesheuvel <ardb@...nel.org>,
        Ingo Molnar <mingo@...nel.org>
Cc:     linux-kernel@...r.kernel.org, Carlos Llamas <cmllamas@...gle.com>,
        "kernelci . org bot" <bot@...nelci.org>
Subject: [PATCH] static_call: fix unused variable warning

'mod' is not used when !CONFIG_MODULES. Mark as __maybe_unused to
fix the following warning:

kernel/static_call.c: In function ‘__static_call_update’:
kernel/static_call.c:153:18: warning: unused variable ‘mod’ [-Wunused-variable]
  153 |   struct module *mod = site_mod->mod;
      |                  ^~~

Fixes: 9183c3f9ed71 ("static_call: Add inline static call infrastructure")
Reported-by: kernelci.org bot <bot@...nelci.org>
Signed-off-by: Carlos Llamas <cmllamas@...gle.com>
---
 kernel/static_call.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/static_call.c b/kernel/static_call.c
index 2c5950b0b90e..8211a34251f8 100644
--- a/kernel/static_call.c
+++ b/kernel/static_call.c
@@ -150,7 +150,7 @@ void __static_call_update(struct static_call_key *key, void *tramp, void *func)
 
 	for (site_mod = &first; site_mod; site_mod = site_mod->next) {
 		bool init = system_state < SYSTEM_RUNNING;
-		struct module *mod = site_mod->mod;
+		struct module __maybe_unused *mod = site_mod->mod;
 
 		if (!site_mod->sites) {
 			/*
-- 
2.31.1.368.gbe11c130af-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ