From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2 08/10] igb_uio: fix IRQ mode handling Date: Fri, 18 Jul 2014 14:41:21 +0200 Message-ID: <3162526.fhnn2gTx5h@xps13> References: <20140606235028.189345212@networkplumber.org> <20140606235113.600528535@networkplumber.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Stephen Hemminger Return-path: In-Reply-To: <20140606235113.600528535-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Hi Stephen, I have other (inlined) comments on this patch. > udev->info.version = "0.1"; > udev->info.handler = igbuio_pci_irqhandler; > udev->info.irqcontrol = igbuio_pci_irqcontrol; > + udev->info.irq = dev->irq; [...] > + /* fall back to MSI */ > case IGBUIO_MSI_INTR_MODE: > - break; > + if (pci_enable_msi(dev) == 0) { > + dev_dbg(&dev->dev, "using MSI"); > + udev->info.irq = dev->irq; I think we can remove this line: info.irq is already set to the right value. > + udev->mode = IGBUIO_MSI_INTR_MODE; > + break; > + } There is no default case in this switch statement. It's now required for the enum completeness. So I suggest to add these lines: + default: + dev_err(&dev->dev, "unknown interrupt mode\n"); + err = -EINVAL; + goto fail_release_iomem; -- Thomas