From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965427AbeAJMhl (ORCPT + 1 other); Wed, 10 Jan 2018 07:37:41 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:41514 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753360AbeAJMhk (ORCPT ); Wed, 10 Jan 2018 07:37:40 -0500 Subject: Re: [PATCH v3 10/16] iommu: introduce device fault report API To: Jacob Pan , "iommu@lists.linux-foundation.org" , LKML , Joerg Roedel , David Woodhouse , Greg Kroah-Hartman , Rafael Wysocki , Alex Williamson Cc: Lan Tianyu , Jean Delvare References: <1510944914-54430-1-git-send-email-jacob.jun.pan@linux.intel.com> <1510944914-54430-11-git-send-email-jacob.jun.pan@linux.intel.com> From: Jean-Philippe Brucker Message-ID: Date: Wed, 10 Jan 2018 12:39:59 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <1510944914-54430-11-git-send-email-jacob.jun.pan@linux.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 17/11/17 18:55, Jacob Pan wrote: [...] > +static inline int iommu_register_device_fault_handler(struct device *dev, > + iommu_dev_fault_handler_t handler, > + void *data) > +{ > + return 0;> +} > + > +static inline int iommu_unregister_device_fault_handler(struct device *dev) > +{ > + return 0; > +} > + > +static inline bool iommu_has_device_fault_handler(struct device *dev) > +{ > + return false; > +} > + > +static inline int iommu_report_device_fault(struct device *dev, struct iommu_fault_event *evt) > +{ > + return 0; > +} Not too important but these stubs, when CONFIG_IOMMU_API is disabled, usually return an error value (-ENODEV) instead of 0. Thanks, Jean > + > static inline int iommu_group_id(struct iommu_group *group) > { > return -ENODEV; >