Skip to contentSkip to conversation

iommu/vt-d: Fix compile warning from intel-svm.h

PATCH In review Joerg Roedel 2 participants 2 messages Feb 10, 2020 – Feb 11, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/vt-d: Fix compile warning from intel-svm.h

From: Joerg Roedel <[email protected]>

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)

            ^~~~~~~~~~~~~~~~~~~~~~~~
Fixes 15060aba71711 ('iommu/vt-d: Helper function to query if a pasid has any active users')
---
 include/linux/intel-svm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/intel-svm.h +1 -1
index 94f047a8a845..d7c403d0dd27 100644
@@ -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;
 }
Signature · 1 line
2.16.4
Acked-by on v1 1/1
#1 lore raw

Hi Joerg,

Quoted 9 lines · Joerg Roedel

From: Joerg Roedel <[email protected]>

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)

Quoted 5 lines
             ^~~~~~~~~~~~~~~~~~~~~~~~
Fixes 15060aba71711 ('iommu/vt-d: Helper function to query if a pasid has any active users')

Best regards,
baolu

Quoted 18 lines
---
  include/linux/intel-svm.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/intel-svm.h +1 -1
index 94f047a8a845..d7c403d0dd27 100644
@@ -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;
  }