Re: [PATCH v2 5/5] vfio: Use cdev_device_add() instead of device_create()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 13, 2021 at 07:08:47PM +0200, Christoph Hellwig wrote:
> > +/* returns true if the get was obtained */
> > +static bool vfio_group_try_get(struct vfio_group *group)
> >  {
> > +	return refcount_inc_not_zero(&group->users);
> >  }
> 
> Do we even need this helper?  Just open coding the refcount_inc_not_zero
> would seem easier to read to me, and there is just a single caller
> anyway.

No we don't, I added it only to have symmetry with the
vfio_group_put() naming.

Alex, what is your taste here?

Thanks,
Jason



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux