> From: Jason Gunthorpe <jgg@xxxxxxxxxx> > Sent: Wednesday, August 31, 2022 9:02 AM > > To vfio_container_detatch_group(). This function is really a container > function. > > Fold the WARN_ON() into it as a precondition assertion. > > A following patch will move the vfio_container functions to their own .c > file. > > Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx> > --- > drivers/vfio/vfio_main.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/drivers/vfio/vfio_main.c b/drivers/vfio/vfio_main.c > index bfa6119ba47337..e145c87f208f3a 100644 > --- a/drivers/vfio/vfio_main.c > +++ b/drivers/vfio/vfio_main.c > @@ -928,12 +928,13 @@ static const struct file_operations vfio_fops = { > /* > * VFIO Group fd, /dev/vfio/$GROUP > */ > -static void __vfio_group_unset_container(struct vfio_group *group) > +static void vfio_container_detatch_group(struct vfio_group *group) s/detatch/detach/ Given it's a vfio_container function is it better to have a container pointer as the first parameter, i.e.: static void vfio_container_detatch_group(struct vfio_container *container, struct vfio_group *group) ditto for patch7: +static void vfio_container_register_device(struct vfio_device *device)