[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 10 Oct 2019 15:29:49 +0200
From: Thomas Bogendoerfer <tbogendoerfer@...e.de>
To: Jakub Kicinski <jakub.kicinski@...ronome.com>
Cc: Jonathan Corbet <corbet@....net>,
Ralf Baechle <ralf@...ux-mips.org>,
Paul Burton <paul.burton@...s.com>,
James Hogan <jhogan@...nel.org>,
Lee Jones <lee.jones@...aro.org>,
"David S. Miller" <davem@...emloft.net>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Alessandro Zummo <a.zummo@...ertech.it>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.com>, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mips@...r.kernel.org,
netdev@...r.kernel.org, linux-rtc@...r.kernel.org,
linux-serial@...r.kernel.org
Subject: Re: [PATCH v8 3/5] mfd: ioc3: Add driver for SGI IOC3 chip
On Wed, 9 Oct 2019 20:17:14 -0700
Jakub Kicinski <jakub.kicinski@...ronome.com> wrote:
> On Wed, 9 Oct 2019 12:17:10 +0200, Thomas Bogendoerfer wrote:
> [...]
> > +static int ioc3_cad_duo_setup(struct ioc3_priv_data *ipd)
> > +{
> > + int ret;
> > +
> > + ret = ioc3_irq_domain_setup(ipd, ipd->pdev->irq);
> > + if (ret)
> > + return ret;
> > +
> > + ret = ioc3_eth_setup(ipd, true);
> > + if (ret)
> > + return ret;
> > +
> > + return ioc3_kbd_setup(ipd);
> > +}
>
> None of these setup calls have a "cleanup" or un-setup call. Is this
> really okay? I know nothing about MFD, but does mfd_add_devices() not
> require a remove for example? Doesn't the IRQ handling need cleanup?
good catch, I'll add that.
> > + ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
> > + if (ret) {
> > + dev_warn(&pdev->dev,
> > + "Failed to set 64-bit DMA mask, trying 32-bit\n");
> > + ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
> > + if (ret) {
> > + dev_err(&pdev->dev, "Can't set DMA mask, aborting\n");
> > + return ret;
>
> So failing here we don't care about disabling the pci deivce..
fixed in the next version.
> > +
> > + /*
> > + * Map all IOC3 registers. These are shared between subdevices
> > + * so the main IOC3 module manages them.
> > + */
> > + regs = pci_ioremap_bar(pdev, 0);
>
> This doesn't seem unmapped on error paths, nor remove?
will fix.
Thank you for the review.
Thomas.
--
SUSE Software Solutions Germany GmbH
HRB 247165 (AG München)
Geschäftsführer: Felix Imendörffer
Powered by blists - more mailing lists