Re: [PATCH 2/2] rust/faux: Add missing parent argument to Registration::new()

Greg Kroah-Hartman
2025-02-26T19:32:32Z

On Wed, Feb 26, 2025 at 11:51:26AM -0500, Lyude Paul wrote:
> On Wed, 2025-02-26 at 11:01 +0100, Greg Kroah-Hartman wrote:
> >
> >
> > I guess you can add parent can be NULL to the SAFETY line?
> >
> > Sorry, I thought I would just leave it this way without a parent pointer
> > until you actually had a user that needed it. And then we could add the
> > new parameter and fix up all callers. No need to add support for it yet
> > without that, changing apis is easy! :)
> >
> > Do you have a real user for this any time soon?
> >
>
> Not particularly! My thought process was mostly just this seems like a simple
> enough addition that it would probably be easy to add it now when we don't
> have any users upstream yet rather than building up faux device users in rust
> and potentially having to refactor later to add such an argument.
>
> I don't think the refactoring would be that much work either, but it seemed
> harmless to just get it over with now.

Ok, fair enough, want me to take this one and you'll figure out if/when
the SAFETY comment needs to be changed for the parent pointer as an
add-on patch?

Or do you want to send a new version? Your choice.

thanks,

greg k-h