[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/9] vfio: Fix compilation errors caused by VFIO migration v1
From: |
Alex Williamson |
Subject: |
Re: [PATCH 2/9] vfio: Fix compilation errors caused by VFIO migration v1 deprecation |
Date: |
Thu, 12 May 2022 15:11:40 -0600 |
On Thu, 12 May 2022 15:25:32 -0300
Jason Gunthorpe <jgg@nvidia.com> wrote:
> On Thu, May 12, 2022 at 11:57:10AM -0600, Alex Williamson wrote:
> > > @@ -767,9 +767,10 @@ static void vfio_migration_state_notifier(Notifier
> > > *notifier, void *data)
> > > case MIGRATION_STATUS_CANCELLED:
> > > case MIGRATION_STATUS_FAILED:
> > > bytes_transferred = 0;
> > > - ret = vfio_migration_set_state(vbasedev,
> > > - ~(VFIO_DEVICE_STATE_SAVING |
> > > VFIO_DEVICE_STATE_RESUMING),
> > > - VFIO_DEVICE_STATE_RUNNING);
> > > + ret = vfio_migration_set_state(
> > > + vbasedev,
> > > + ~(VFIO_DEVICE_STATE_V1_SAVING |
> > > VFIO_DEVICE_STATE_V1_RESUMING),
> > > + VFIO_DEVICE_STATE_V1_RUNNING);
> >
> > Yikes! Please follow the line wrapping used elsewhere. There's no need
> > to put the first arg on a new line and subsequent wrapped lines should
> > be indented to match the previous line, or at least to avoid wrapping
> > itself. Here we can use something like:
>
> This is generated by clang-format with one of the qmeu styles, it
> follows the documented guide:
>
> In case of function, there are several variants:
>
> - 4 spaces indent from the beginning
> - align the secondary lines just after the opening parenthesis of the
> first
>
> clang-format selected the first option due to its optimization
> algorithm.
>
> Knowing nothing about qmeu, I am confused??
Maybe someone needs to throw more AI models at clang-format so that it
considers the more readable option? QEMU does a lot wrong with style
imo, and maybe it's technically compliant as written, but I think what
I proposed is also compliant, as well as more readable and more
consistent with the existing file. Thanks,
Alex
[PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported, Avihai Horon, 2022/05/12
- Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported, Juan Quintela, 2022/05/16
- Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported, Alex Williamson, 2022/05/16
- Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported, Jason Gunthorpe, 2022/05/16
- Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported, Alex Williamson, 2022/05/17
- Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported, Jason Gunthorpe, 2022/05/17
- Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported, Alex Williamson, 2022/05/17
- Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported, Jason Gunthorpe, 2022/05/17