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

Re: [PATCH v5 06/10] vpci: Hide extended capability when it fails to initialize



On Fri, Jun 06, 2025 at 08:30:42AM +0000, Chen, Jiqian wrote:
> On 2025/6/5 22:47, Roger Pau Monné wrote:
> > On Mon, May 26, 2025 at 05:45:55PM +0800, Jiqian Chen wrote:
> >> @@ -209,11 +301,11 @@ static int vpci_init_capabilities(struct pci_dev 
> >> *pdev)
> >>                     pdev->domain, &pdev->sbdf,
> >>                     is_ext ? "extended" : "legacy", cap);
> >>              if ( !is_ext )
> >> -            {
> >>                  rc = vpci_capability_hide(pdev, cap);
> >> -                if ( rc )
> >> -                    return rc;
> >> -            }
> >> +            else
> >> +                rc = vpci_ext_capability_hide(pdev, cap);
> >> +            if ( rc )
> >> +                return rc;
> > 
> > Could the code in the previous patch be:
> > 
> > if ( !is_ext )
> >     rc = vpci_capability_hide(pdev, cap);
> > 
> > if ( rc )
> >     return rc;
> > 
> > So that your introduction here is simpler?
> OK, but the logic of the previous patch will become a little strange.
> Anyway, the strange will disappear after applying this patch.

No strong opinion really, was mostly a recommendation to avoid extra
changes here.  In a series it's best if you try to arrange the code so
that it's only modified once (if possible, obviously).

Thanks, Roger.



 


Rackspace

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