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>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260120070701.3689-1-jun85566@gmail.com>
Date: Tue, 20 Jan 2026 16:07:01 +0900
From: Lee Yongjun <jun85566@...il.com>
To: vaibhav.sr@...il.com,
	mgreer@...malcreek.com,
	johan@...nel.org,
	elder@...nel.org,
	gregkh@...uxfoundation.org
Cc: greybus-dev@...ts.linaro.org,
	linux-staging@...ts.linux.dev,
	linux-kernel@...r.kernel.org,
	Lee Yongjun <jun85566@...il.com>
Subject: [PATCH] staging: greybus: audio: Limit scope of jack-related variables

Move jack-related variable declarations inside the CONFIG_SND_JACK
conditional block.

These variables are only used when CONFIG_SND_JACK is enabled, so
limiting their scope improves code clarity and avoids unused variable
warnings when the option is disabled.

No functional changes intended.

Signed-off-by: Lee Yongjun <jun85566@...il.com>
---
 drivers/staging/greybus/audio_codec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c
index 444c53b4e08d..f752d5fbd685 100644
--- a/drivers/staging/greybus/audio_codec.c
+++ b/drivers/staging/greybus/audio_codec.c
@@ -935,8 +935,6 @@ static void gbaudio_codec_cleanup(struct gbaudio_module_info *module)
 void gbaudio_unregister_module(struct gbaudio_module_info *module)
 {
 	struct snd_soc_component *comp = gbcodec->component;
-	struct gbaudio_jack *jack, *n;
-	int mask;
 
 	dev_dbg(comp->dev, "Unregister %s module\n", module->name);
 
@@ -948,6 +946,8 @@ void gbaudio_unregister_module(struct gbaudio_module_info *module)
 	mutex_unlock(&gbcodec->lock);
 
 #ifdef CONFIG_SND_JACK
+	struct gbaudio_jack *jack, *n;
+	int mask;
 	/* free jack devices for this module jack_list */
 	list_for_each_entry_safe(jack, n, &module->jack_list, list) {
 		if (jack == &module->headset)
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ