>-----Original Message----- >From: Joao Martins <joao.m.mart...@oracle.com> >Sent: Friday, June 30, 2023 6:41 PM >Subject: Re: [PATCH v5 4/7] vfio/migration: Return bool type for some vfio >migration related functions > >On 30/06/2023 08:36, Zhenzhong Duan wrote: >> Include: >> vfio_block_multiple_devices_migration(), >> vfio_block_giommu_migration(), >> vfio_block_migration(), >> vfio_migration_realize(). >> > >Maybe some brief commit message would be useful as to why we are >renaming it >("Migration disabled" no longer applies as that is being removed): > >Make vfio_migration_realize() adhere to the convention of other realize() >callbacks by returning bool instead of int. In doing so, change also the the >functions used in vfio_migration_realize() return path to have bool too. > >But see a remark below -- I think if you move the rename patch to be the last >one, you will have less to rename (?) Unless we really want to rename >everything >that vfio_migration_realize() ends up calling to return bool. In which case my >comment then no longer applies. I generally favour not loosing error >information >until last minute, but OTOH Error is provided so errors will be propagated in >some way. Make sense, I'll only rename vfio_migration_realize() and for other internal functions, keep their error info in return value as you suggested. This way we still meet Cedric's expectation of vfio_migration_realize() following the qdev_realize() prototype.
Thanks Zhenzhong