[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0jwqGcj8qn7s5R9pTPZ1ndyTixeQ2vps0qzKN1Bcq0CaA@mail.gmail.com>
Date: Fri, 31 Mar 2023 16:48:13 +0200
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 3/7] driver core: class: remove subsystem private pointer
from struct class
On Fri, Mar 31, 2023 at 11:33 AM Greg Kroah-Hartman
<gregkh@...uxfoundation.org> wrote:
>
> Now that the last users of the subsystem private pointer in struct class
> are gone, the pointer can be removed, as no one is using it. One step
> closer to allowing struct class to be const and moved into read-only
> memory.
>
> Cc: "Rafael J. Wysocki" <rafael@...nel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Acked-by: Rafael J. Wysocki <rafael@...nel.org>
> ---
> drivers/base/class.c | 4 ----
> include/linux/device/class.h | 2 --
> 2 files changed, 6 deletions(-)
>
> diff --git a/drivers/base/class.c b/drivers/base/class.c
> index a8a1bf976290..fcfb295363cc 100644
> --- a/drivers/base/class.c
> +++ b/drivers/base/class.c
> @@ -97,8 +97,6 @@ static void class_release(struct kobject *kobj)
>
> pr_debug("class '%s': release.\n", class->name);
>
> - class->p = NULL;
> -
> if (class->class_release)
> class->class_release(class);
> else
> @@ -206,7 +204,6 @@ int class_register(struct class *cls)
> cp->subsys.kobj.kset = class_kset;
> cp->subsys.kobj.ktype = &class_ktype;
> cp->class = cls;
> - cls->p = cp;
>
> error = kset_register(&cp->subsys);
> if (error)
> @@ -222,7 +219,6 @@ int class_register(struct class *cls)
>
> err_out:
> kfree(cp);
> - cls->p = NULL;
> return error;
> }
> EXPORT_SYMBOL_GPL(class_register);
> diff --git a/include/linux/device/class.h b/include/linux/device/class.h
> index 9cb5db0588c8..f7aad64e256a 100644
> --- a/include/linux/device/class.h
> +++ b/include/linux/device/class.h
> @@ -71,8 +71,6 @@ struct class {
> void (*get_ownership)(const struct device *dev, kuid_t *uid, kgid_t *gid);
>
> const struct dev_pm_ops *pm;
> -
> - struct subsys_private *p;
> };
>
> struct class_dev_iter {
> --
> 2.40.0
>
Powered by blists - more mailing lists