Re: [PATCH v1 11/14] vfio/type1: Register device notifier

From: Christoph Hellwig
Date: Wed Mar 10 2021 - 03:05:14 EST


> +
> + if (!dma->pfnmap) {
> + struct vfio_device *device;
> + unsigned long base_pfn;
> + struct pfnmap_obj *pfnmap;

Please factor this whole block into a separate helper to keep it
readable.