From: Lee Yongjun <jun85566@gmail.com>
To: vaibhav.sr@gmail.com, mgreer@animalcreek.com, johan@kernel.org,
elder@kernel.org, gregkh@linuxfoundation.org
Cc: greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org, Lee Yongjun <jun85566@gmail.com>
Subject: [PATCH] staging: greybus: audio: Limit scope of jack-related variables
Date: Tue, 20 Jan 2026 16:07:01 +0900 [thread overview]
Message-ID: <20260120070701.3689-1-jun85566@gmail.com> (raw)
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@gmail.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
next reply other threads:[~2026-01-20 7:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-20 7:07 Lee Yongjun [this message]
2026-01-20 7:09 ` [PATCH] staging: greybus: audio: Limit scope of jack-related variables Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260120070701.3689-1-jun85566@gmail.com \
--to=jun85566@gmail.com \
--cc=elder@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mgreer@animalcreek.com \
--cc=vaibhav.sr@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox