summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2020-02-10 10:36:56 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-28 16:36:15 +0100
commit837f007098b2521b8b10ced2fdf07fd1d0af66f9 (patch)
tree106cbf9e593e1cb7efe1bd4f65875caa9fd0256d
parent591f3bc646edf4622f86f9266e4e215bde32538b (diff)
downloadlinux-837f007098b2521b8b10ced2fdf07fd1d0af66f9.tar.gz
linux-837f007098b2521b8b10ced2fdf07fd1d0af66f9.tar.bz2
linux-837f007098b2521b8b10ced2fdf07fd1d0af66f9.zip
iommu/vt-d: Fix compile warning from intel-svm.h
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--include/linux/intel-svm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/intel-svm.h b/include/linux/intel-svm.h
index 99bc5b3ae26e..733eaf95e207 100644
--- a/include/linux/intel-svm.h
+++ b/include/linux/intel-svm.h
@@ -130,7 +130,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;
}