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

Reply via email to