| From 4e8f922ee3577e8d0c9361132e98e4e839e432cf Mon Sep 17 00:00:00 2001 |
| From: Joerg Roedel <jroedel@suse.de> |
| Date: Mon, 10 Feb 2020 10:36:56 +0100 |
| Subject: [PATCH] iommu/vt-d: Fix compile warning from intel-svm.h |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| commit e7598fac323aad0e502415edeffd567315994dd6 upstream. |
| |
| The intel_svm_is_pasid_valid() needs to be marked inline, otherwise it |
| causes the compile warning below: |
| |
| CC [M] drivers/dma/idxd/cdev.o |
| In file included from drivers/dma/idxd/cdev.c:9:0: |
| ./include/linux/intel-svm.h:125:12: warning: ‘intel_svm_is_pasid_valid’ defined but not used [-Wunused-function] |
| static int intel_svm_is_pasid_valid(struct device *dev, int pasid) |
| ^~~~~~~~~~~~~~~~~~~~~~~~ |
| |
| Reported-by: Borislav Petkov <bp@alien8.de> |
| Fixes: 15060aba71711 ('iommu/vt-d: Helper function to query if a pasid has any active users') |
| Signed-off-by: Joerg Roedel <jroedel@suse.de> |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| |
| diff --git a/include/linux/intel-svm.h b/include/linux/intel-svm.h |
| index 54ffcc6a322e..cb0e8ee7eca4 100644 |
| --- a/include/linux/intel-svm.h |
| +++ b/include/linux/intel-svm.h |
| @@ -122,7 +122,7 @@ static inline int intel_svm_unbind_mm(struct device *dev, int pasid) |
| BUG(); |
| } |
| |
| -static int intel_svm_is_pasid_valid(struct device *dev, int pasid) |
| +static inline int intel_svm_is_pasid_valid(struct device *dev, int pasid) |
| { |
| return -EINVAL; |
| } |
| -- |
| 2.7.4 |
| |