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?