Re: [PATCH V12 3/9] PCI: Create PCIe library functions in support of DOE mailboxes.

From: Ira Weiny
Date: Wed Jun 29 2022 - 12:53:55 EST


On Tue, Jun 28, 2022 at 11:20:32AM -0700, Ira wrote:
> On Tue, Jun 28, 2022 at 03:16:26PM +0100, Jonathan Cameron wrote:
> > On Mon, 27 Jun 2022 21:15:21 -0700
> > ira.weiny@xxxxxxxxx wrote:
> >

[snip]

> >
> > > +static void pci_doe_free_mb(struct pci_doe_mb *doe_mb)
> > > +{
> > > + if (doe_mb->work_queue)
> >
> > I'm not a great fan of free functions that check a bunch of conditions
> > because they may be called before things are set up.
>
> I'll see what I can do. I do kind of like this but I think it gets muddled and
> I'm not dead set on either way.

I've completely reworked pci_doe_create_mb() to use devm throughout.

It is much cleaner. Thanks Jonathan!
Ira