Re: [PATCH 1/2] driver core: remove devm_device_remove_groups()

From: Rafael J. Wysocki
Date: Thu Nov 10 2022 - 08:08:11 EST


On Thu, Nov 10, 2022 at 10:34 AM Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On Wed, Nov 09, 2022 at 01:10:59PM -0800, Dmitry Torokhov wrote:
> > On Wed, Nov 09, 2022 at 03:11:47PM +0100, Rafael J. Wysocki wrote:
> > > On Wed, Nov 9, 2022 at 3:07 PM Greg Kroah-Hartman
> > > <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> > > >
> > > > There is no in-kernel user of this function, so it is not needed anymore
> > > > and can be removed.
> > > >
> > > > Cc: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
> > > > Cc: "Rafael J. Wysocki" <rafael@xxxxxxxxxx>
> > > > Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> > >
> > > For both patches in the series:
> > >
> > > Reviewed-by: Rafael J. Wysocki <rafael@xxxxxxxxxx>
> >
> > I find it really weird to have an asymmetric core API...
>
> I'm working on fixing up that asymmetric-ness. We have only one user of
> devm_device_add_groups() and only a handful of devm_device_add_group()
> left in the tree.
>
> But it turns out that no one ever called these functions anyway, so they
> aren't needed even if we did keep the "add" functions. So they should
> be dropped no matter what.

Totally agreed.