On Tue, Mar 30, 2021 at 06:14:13PM +0200, Cornelia Huck wrote: > On Fri, 26 Mar 2021 08:53:50 -0300 > Jason Gunthorpe <jgg@xxxxxxxxxx> wrote: > > > On Fri, Mar 26, 2021 at 03:53:10AM +0000, Tian, Kevin wrote: > > > > > > @@ -58,12 +58,11 @@ void mdev_release_parent(struct kref *kref) > > > > /* Caller must hold parent unreg_sem read or write lock */ > > > > static void mdev_device_remove_common(struct mdev_device *mdev) > > > > { > > > > - struct mdev_parent *parent; > > > > + struct mdev_parent *parent = mdev->type->parent; > > > > > > What about having a wrapper here, like mdev_parent_dev? For > > > readability it's not necessary to show that the parent is indirectly > > > retrieved through mdev_type. > > > > I think that is too much wrappering, we only have three usages of the > > mdev->type->parent sequence and two are already single line inlines. > > I'm counting more of those in this patch... or do you mean at the end > of the series? I'm thinking of either moving them to inlines earlier or moving them all as a final patch. Given how far we've come review wise I'm inclined to do the latter Thanks, Jason