[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171208132219.450a6ddc@jacob-builder>
Date: Fri, 8 Dec 2017 13:22:19 -0800
From: Jacob Pan <jacob.jun.pan@...ux.intel.com>
To: Lu Baolu <baolu.lu@...ux.intel.com>
Cc: iommu@...ts.linux-foundation.org,
LKML <linux-kernel@...r.kernel.org>,
Joerg Roedel <joro@...tes.org>,
David Woodhouse <dwmw2@...radead.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Rafael Wysocki <rafael.j.wysocki@...el.com>,
Alex Williamson <alex.williamson@...hat.com>,
Lan Tianyu <tianyu.lan@...el.com>,
Jean Delvare <khali@...ux-fr.org>,
jacob.jun.pan@...ux.intel.com
Subject: Re: [PATCH v3 10/16] iommu: introduce device fault report API
On Tue, 5 Dec 2017 14:22:41 +0800
Lu Baolu <baolu.lu@...ux.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
Powered by blists - more mailing lists