[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75VdcsnPxOLmHcwVSJn2c9jn2dFuWdyb-hiXaz4iUm2yYgA@mail.gmail.com>
Date: Mon, 15 Feb 2021 16:55:48 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Jan Kiszka <jan.kiszka@...mens.com>
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Dejin Zheng <zhengdejin5@...il.com>,
Daniel Mack <daniel@...que.org>,
Haojian Zhuang <haojian.zhuang@...il.com>,
Robert Jarzmik <robert.jarzmik@...e.fr>,
Mark Brown <broonie@...nel.org>,
Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
linux-spi <linux-spi@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] spi: pca2xx-pci: Fix an issue about missing call to 'pci_free_irq_vectors()'
On Mon, Feb 15, 2021 at 3:52 PM Jan Kiszka <jan.kiszka@...mens.com> wrote:
> On 15.02.21 14:22, Andy Shevchenko wrote:
> > On Sun, Feb 14, 2021 at 10:57:46PM +0800, Dejin Zheng wrote:
> >> Call to 'pci_free_irq_vectors()' are missing both in the error handling
> >> path of the probe function, and in the remove function. So add them.
> >
> > I'm wondering if you noticed that it's done by pcim_* API.
> > Perhaps you can introduce pcim_alloc_irq_vectors() or so and do not add these
> > calls at all?
>
> You mean as plain wrapper for pci_alloc_irq_vectors, just to document
> it's managed?
Last time we discussed that with Christoph Hellwig he was on the side
that naming is problematic. So he insisted that it's pure luck that it
works like this. And IIUC his point, we need to create an explicit
managed version of pci_alloc_irq_vectorrs() that the caller will have
clear understanding what it does.
> >> Fixes: 64e02cb0bdfc7c ("spi: pca2xx-pci: Allow MSI")
> >
> > No, it doesn't fix anything.
>
> Ah, now I recall: imbalanced APIs.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists