From: Hardik Phalet <hardik.phalet@pm.me>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Vaibhav Agarwal <vaibhav.sr@gmail.com>
Cc: Dan Carpenter <dan.carpenter@linaro.org>,
Mark Greer <mgreer@animalcreek.com>,
Johan Hovold <johan@kernel.org>, Alex Elder <elder@kernel.org>,
greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org, Hardik Phalet <hardik.phalet@pm.me>
Subject: [PATCH v3 1/2] staging: greybus: audio: remove unused gb_audio_manager_get_module()
Date: Tue, 24 Feb 2026 18:54:59 +0000 [thread overview]
Message-ID: <20260224185421.824210-2-hardik.phalet@pm.me> (raw)
In-Reply-To: <20260224185421.824210-1-hardik.phalet@pm.me>
gb_audio_manager_get_module() has no in-tree callers. The previously
reported NULL dereference is therefore unreachable.
Remove the unused function to avoid carrying dead code.
Signed-off-by: Hardik Phalet <hardik.phalet@pm.me>
---
drivers/staging/greybus/audio_manager.c | 12 ------------
drivers/staging/greybus/audio_manager.h | 7 -------
2 files changed, 19 deletions(-)
diff --git a/drivers/staging/greybus/audio_manager.c b/drivers/staging/greybus/audio_manager.c
index 27ca5f796c5f..118ada9b909b 100644
--- a/drivers/staging/greybus/audio_manager.c
+++ b/drivers/staging/greybus/audio_manager.c
@@ -105,18 +105,6 @@ void gb_audio_manager_remove_all(void)
}
EXPORT_SYMBOL_GPL(gb_audio_manager_remove_all);
-struct gb_audio_manager_module *gb_audio_manager_get_module(int id)
-{
- struct gb_audio_manager_module *module;
-
- down_read(&modules_rwsem);
- module = gb_audio_manager_get_locked(id);
- kobject_get(&module->kobj);
- up_read(&modules_rwsem);
- return module;
-}
-EXPORT_SYMBOL_GPL(gb_audio_manager_get_module);
-
void gb_audio_manager_put_module(struct gb_audio_manager_module *module)
{
kobject_put(&module->kobj);
diff --git a/drivers/staging/greybus/audio_manager.h b/drivers/staging/greybus/audio_manager.h
index be605485a8ce..c3ef62ee22c8 100644
--- a/drivers/staging/greybus/audio_manager.h
+++ b/drivers/staging/greybus/audio_manager.h
@@ -54,13 +54,6 @@ int gb_audio_manager_remove(int id);
*/
void gb_audio_manager_remove_all(void);
-/*
- * Retrieves a gb_audio_manager_module_descriptor for the specified id.
- * Returns the gb_audio_manager_module_descriptor structure,
- * or NULL if there is no module with the specified ID.
- */
-struct gb_audio_manager_module *gb_audio_manager_get_module(int id);
-
/*
* Decreases the refcount of the module, obtained by the get function.
* Modules are removed via gb_audio_manager_remove
--
2.53.0
next prev parent reply other threads:[~2026-02-24 18:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-24 18:54 [PATCH v3 0/2] staging: greybus: audio: remove dead code and clean up Hardik Phalet
2026-02-24 18:54 ` Hardik Phalet [this message]
2026-02-25 15:04 ` [PATCH v3 1/2] staging: greybus: audio: remove unused gb_audio_manager_get_module() Greg Kroah-Hartman
2026-02-24 18:55 ` [PATCH v3 2/2] staging: greybus: audio: drop stale TODO comment Hardik Phalet
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=20260224185421.824210-2-hardik.phalet@pm.me \
--to=hardik.phalet@pm.me \
--cc=dan.carpenter@linaro.org \
--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
all inboxes | Powered by JetHome®