On Thu, 12 May 2022 15:25:32 -0300
Jason Gunthorpe <j...@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


Reply via email to