Re: [PATCH v2 1/8] driver core: add helper macro for module_faux_driver() boilerplate

From: Sudeep Holla
Date: Tue Apr 15 2025 - 08:28:05 EST


On Tue, Apr 15, 2025 at 02:21:10PM +0200, Greg Kroah-Hartman wrote:
> On Tue, Mar 18, 2025 at 05:01:39PM +0000, Sudeep Holla wrote:
> > For simple modules that needs to create a faux device without any
> > additional setup code ends up being a block of duplicated boilerplate.
> >
> > Add a new macro, module_faux_driver(), which help to replaces the
> > those duplicated boilerplate.
> >
> > This macro use the same idea of module_platform_driver() but adds this
> > initial condition to avoid creation of faux device if not necessary.
>
> What is this "condition" for?
>
> Every time you put "true" or "false" in the function call, someone will
> have to look it up to see what is going on, that's going to be a pain.
>
> Making apis is hard, let's not making using them even harder.
>

Agreed and also since the number of users the would use reduced due to
their autoload dependency, I dropped the idea of having the macro. All the
ones that can be moved to use faux_device have now moved(I mean queued)
without this macro as it was in v1 of the series.

Thanks for the time and review. Sorry I should have provided update on this
after I had to drop all the efi related patches for the above reason.

--
Regards,
Sudeep