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

Re: [Xen-devel] [PATCH for-4.13 v3] passthrough: simplify locking and logging



On 18/11/2019 11:21, Jan Beulich wrote:
> On 15.11.2019 19:59, Igor Druzhinin wrote:
>> --- a/xen/drivers/passthrough/pci.c
>> +++ b/xen/drivers/passthrough/pci.c
>> @@ -932,30 +932,26 @@ static int deassign_device(struct domain *d, uint16_t 
>> seg, uint8_t bus,
>>              break;
>>          ret = hd->platform_ops->reassign_device(d, target, devfn,
>>                                                  pci_to_dev(pdev));
>> -        if ( !ret )
>> -            continue;
>> -
>> -        printk(XENLOG_G_ERR "%pd: deassign %04x:%02x:%02x.%u failed (%d)\n",
>> -               d, seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), ret);
>> -        return ret;
>> +        if ( ret )
>> +            goto out;
>>      }
>>  
>>      devfn = pdev->devfn;
>>      ret = hd->platform_ops->reassign_device(d, target, devfn,
>>                                              pci_to_dev(pdev));
>>      if ( ret )
>> -    {
>> -        dprintk(XENLOG_G_ERR,
>> -                "%pd: deassign device (%04x:%02x:%02x.%u) failed\n",
>> -                d, seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
>> -        return ret;
>> -    }
>> +        goto out;
>>  
>>      if ( pdev->domain == hardware_domain  )
>>          pdev->quarantine = false;
>>  
>>      pdev->fault.count = 0;
>>  
>> +out:
>> +    if ( ret )
>> +        printk(XENLOG_G_ERR "%pd: deassign (%04x:%02x:%02x.%u) failed 
>> (%d)\n",
>> +               d, seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), ret);
>> +
> 
> Since, despite my suggestion to the contrary, you've kept the
> introduction of goto here, the label should have got indented
> (as pointed out for v2). With this adjusted (which could be done
> while committing)
> Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Sorry, thought you meant the other thing. Andrew clarified the rationale
behind your request.

Igor

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.