[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0ieLfMs2ytN5qRjXBtDmSYZC7XA6ACdL11uUQCun=v4OA@mail.gmail.com>
Date: Tue, 10 Jan 2023 13:35:56 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org,
"Rafael J. Wysocki" <rafael@...nel.org>
Subject: Re: [PATCH 4/6] driver core: make subsys_dev_iter_next() static
On Mon, Jan 9, 2023 at 6:58 PM Greg Kroah-Hartman
<gregkh@...uxfoundation.org> wrote:
>
> The function subsys_dev_iter_next() is only used in drivers/base/bus.c
> so make it static to that file and remove the global export.
>
> Cc: "Rafael J. Wysocki" <rafael@...nel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Reviewed-by: Rafael J. Wysocki <rafael@...nel.org>
> ---
> drivers/base/bus.c | 3 +--
> include/linux/device/bus.h | 1 -
> 2 files changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/base/bus.c b/drivers/base/bus.c
> index a375305a11dd..4be73f58d0ad 100644
> --- a/drivers/base/bus.c
> +++ b/drivers/base/bus.c
> @@ -976,7 +976,7 @@ static void subsys_dev_iter_init(struct subsys_dev_iter *iter, struct bus_type *
> * free to do whatever it wants to do with the device including
> * calling back into subsys code.
> */
> -struct device *subsys_dev_iter_next(struct subsys_dev_iter *iter)
> +static struct device *subsys_dev_iter_next(struct subsys_dev_iter *iter)
> {
> struct klist_node *knode;
> struct device *dev;
> @@ -990,7 +990,6 @@ struct device *subsys_dev_iter_next(struct subsys_dev_iter *iter)
> return dev;
> }
> }
> -EXPORT_SYMBOL_GPL(subsys_dev_iter_next);
>
> /**
> * subsys_dev_iter_exit - finish iteration
> diff --git a/include/linux/device/bus.h b/include/linux/device/bus.h
> index a1da2f8647af..5a7590bc7913 100644
> --- a/include/linux/device/bus.h
> +++ b/include/linux/device/bus.h
> @@ -154,7 +154,6 @@ struct subsys_dev_iter {
> struct klist_iter ki;
> 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);
>
> int bus_for_each_dev(struct bus_type *bus, struct device *start, void *data,
> --
> 2.39.0
>
Powered by blists - more mailing lists