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

Re: [PATCH v10 06/17] vpci/header: rework exit path in init_bars



On Thu, Oct 12, 2023 at 10:09:16PM +0000, Volodymyr Babchuk wrote:
> Introduce "fail" label in init_bars() function to have the centralized
> error return path. This is the pre-requirement for the future changes
> in this function.
> 
> This patch does not introduce functional changes.
> 
> Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>
> Suggested-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> --
> In v10:
> - Added Roger's A-b tag.
> In v9:
> - New in v9
> ---
>  xen/drivers/vpci/header.c | 20 +++++++-------------
>  1 file changed, 7 insertions(+), 13 deletions(-)
> 
> diff --git a/xen/drivers/vpci/header.c b/xen/drivers/vpci/header.c
> index 176fe16b9f..33db58580c 100644
> --- a/xen/drivers/vpci/header.c
> +++ b/xen/drivers/vpci/header.c
> @@ -581,11 +581,7 @@ static int cf_check init_bars(struct pci_dev *pdev)
>              rc = vpci_add_register(pdev->vpci, vpci_hw_read32, bar_write, 
> reg,
>                                     4, &bars[i]);
>              if ( rc )
> -            {
> -                pci_conf_write16(pdev->sbdf, PCI_COMMAND, cmd);
> -                return rc;
> -            }
> -
> +                goto fail;

One nit that can be fixed at commit IMO, could you please avoid
removing the empty line between goto fail; and continue;?

Thanks, Roger.



 


Rackspace

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