Re: [PATCH v5 04/14] iommufd: Abstract an iommufd_eventq from iommufd_fault
From: Nicolin Chen
Date: Fri Jan 10 2025 - 15:49:37 EST
On Fri, Jan 10, 2025 at 01:26:37PM -0400, Jason Gunthorpe wrote:
> +#define INIT_EVENTQ_FOPS(read_op, write_op) \
> + (struct file_operations){ \
> + .owner = THIS_MODULE, \
> + .open = nonseekable_open, \
> + .read = read_op, \
> + .write = write_op, \
> + .poll = iommufd_eventq_fops_poll, \
> + .release = iommufd_eventq_fops_release, \
> + }
There is an ERROR complained by checkpatch. So I changed a bit,
and squashed it to the previous patch adding iommufd_fault_init:
+#define INIT_FAULT_FOPS(read_op, write_op) \
+ ((const struct file_operations){ \
+ .owner = THIS_MODULE, \
+ .open = nonseekable_open, \
+ .read = read_op, \
+ .write = write_op, \
+ .poll = iommufd_fault_fops_poll, \
+ .release = iommufd_fault_fops_release, \
+ })
Thanks
Nicolin