From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>
Subject: [PATCH 3/6] driver core: make subsys_dev_iter_init() static
Date: Mon, 9 Jan 2023 18:58:07 +0100 [thread overview]
Message-ID: <20230109175810.2965448-3-gregkh@linuxfoundation.org> (raw)
In-Reply-To: <20230109175810.2965448-1-gregkh@linuxfoundation.org>
No one outside of drivers/base/bus.c calls this function so make it
static and remove the exported symbol.
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/base/bus.c | 5 ++---
include/linux/device/bus.h | 4 ----
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 45aa8d996f0a..a375305a11dd 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -953,8 +953,8 @@ EXPORT_SYMBOL_GPL(bus_sort_breadthfirst);
* otherwise if it is NULL, the iteration starts at the beginning of
* the list.
*/
-void subsys_dev_iter_init(struct subsys_dev_iter *iter, struct bus_type *subsys,
- struct device *start, const struct device_type *type)
+static void subsys_dev_iter_init(struct subsys_dev_iter *iter, struct bus_type *subsys,
+ struct device *start, const struct device_type *type)
{
struct klist_node *start_knode = NULL;
@@ -963,7 +963,6 @@ void subsys_dev_iter_init(struct subsys_dev_iter *iter, struct bus_type *subsys,
klist_iter_init_node(&subsys->p->klist_devices, &iter->ki, start_knode);
iter->type = type;
}
-EXPORT_SYMBOL_GPL(subsys_dev_iter_init);
/**
* subsys_dev_iter_next - iterate to the next device
diff --git a/include/linux/device/bus.h b/include/linux/device/bus.h
index d865440d8c02..a1da2f8647af 100644
--- a/include/linux/device/bus.h
+++ b/include/linux/device/bus.h
@@ -154,10 +154,6 @@ struct subsys_dev_iter {
struct klist_iter ki;
const struct device_type *type;
};
-void subsys_dev_iter_init(struct subsys_dev_iter *iter,
- struct bus_type *subsys,
- struct device *start,
- const struct device_type *type);
struct device *subsys_dev_iter_next(struct subsys_dev_iter *iter);
void subsys_dev_iter_exit(struct subsys_dev_iter *iter);
--
2.39.0
next prev parent reply other threads:[~2023-01-09 18:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 17:58 [PATCH 1/6] driver core: make bus_get_device_klist() static Greg Kroah-Hartman
2023-01-09 17:58 ` [PATCH 2/6] driver core: remove subsys_find_device_by_id() Greg Kroah-Hartman
2023-01-10 12:34 ` Rafael J. Wysocki
2023-01-09 17:58 ` Greg Kroah-Hartman [this message]
2023-01-10 12:35 ` [PATCH 3/6] driver core: make subsys_dev_iter_init() static Rafael J. Wysocki
2023-01-09 17:58 ` [PATCH 4/6] driver core: make subsys_dev_iter_next() static Greg Kroah-Hartman
2023-01-10 12:35 ` Rafael J. Wysocki
2023-01-09 17:58 ` [PATCH 5/6] driver core: make subsys_dev_iter_exit() static Greg Kroah-Hartman
2023-01-10 12:36 ` Rafael J. Wysocki
2023-01-09 17:58 ` [PATCH 6/6] driver core: move struct subsys_dev_iter to a local file Greg Kroah-Hartman
2023-01-10 12:37 ` Rafael J. Wysocki
2023-01-10 12:33 ` [PATCH 1/6] driver core: make bus_get_device_klist() static Rafael J. Wysocki
2023-01-10 12:43 ` Greg Kroah-Hartman
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=20230109175810.2965448-3-gregkh@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.