Re: [PATCH] kobject: remove kset from struct kset_uevent_ops callbacks

From: Greg Kroah-Hartman
Date: Tue Dec 28 2021 - 05:08:14 EST


On Mon, Dec 27, 2021 at 08:41:36PM +0000, Wedson Almeida Filho wrote:
> On Mon, Dec 27, 2021 at 05:39:24PM +0100, Greg Kroah-Hartman wrote:
> > There is no need to pass the pointer to the kset in the struct
> > kset_uevent_ops callbacks as no one uses it, so just remove that pointer
> > entirely.
>
> In the future, if someone needs the kset they can always find it by looking for
> the first non-null kset in the kobject or its parent chain, right? IOW, we're
> not losing any information by removing this.

Or even easier, we can add it back if needed :)

> >
> > Cc: Rafael J. Wysocki <rafael@xxxxxxxxxx>
> > Cc: Wedson Almeida Filho <wedsonaf@xxxxxxxxxx>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
>
> Reviewed-by: Wedson Almeida Filho <wedsonaf@xxxxxxxxxx>

Thanks for the review.

greg k-h