On Wed, Dec 06, 2017 at 09:19:16AM -0700, Jan Beulich wrote:
> Instead of giving, to subsequent code, the appearance of there not
> having been any "info" data provided, adjust the conditional guarding
> SR-IOV handling.
> 
> Signed-off-by: Jan Beulich <jbeul...@suse.com>

Reviewed-by: Roger Pau Monné <roger....@citrix.com>

> --- a/xen/drivers/passthrough/pci.c
> +++ b/xen/drivers/passthrough/pci.c
> @@ -629,10 +629,7 @@ int pci_add_device(u16 seg, u8 bus, u8 d
>      else if ( info->is_extfn )
>          pdev_type = "extended function";
>      else
> -    {
> -        info = NULL;
>          pdev_type = "device";
> -    }

You could shorten the if ... else if ... with something like:

pdev_type = "device";

if ( info && info->is_virtfn )
...
else if ( info && info->is_extfn )
...

But I'm not sure that's much better, it will just make the source
slightly shorter.

Thanks, Roger.

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

Reply via email to