On Tue, 5 Dec 2017 14:22:41 +0800
Lu Baolu <baolu...@linux.intel.com> wrote:

> > +int iommu_report_device_fault(struct device *dev, struct
> > iommu_fault_event *evt) +{
> > +   /* we only report device fault if there is a handler
> > registered */
> > +   if (!dev->iommu_param || !dev->iommu_param->fault_param ||
> > +           !dev->iommu_param->fault_param->handler)  
> 
> Can this replaced by:
> 
>     if (!iommu_has_device_fault_handler(dev))
> 
right, and under a lock too.

Thanks,

Jacob

Reply via email to