Skip to contentSkip to conversation

iommu/vt-d: fix a GCC warning

PATCH Applied Qian Cai 3 participants 3 messages May 21, 2020 – May 25, 2020 IOMMU

lore
Share & tools
lore

Qian Cai

author
#0 lore raw

PATCH 1/1 iommu/vt-d: fix a GCC warning

The commit 6ee1b77ba3ac ("iommu/vt-d: Add svm/sva invalidate function") introduced a GCC warning,

drivers/iommu/intel-iommu.c:5330:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration]
const static int
^~~~~

---
 drivers/iommu/intel-iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/intel-iommu.c +1 -1
index f75d7d9c231f..ff5a30a94679 100644
@@ -5327,7 +5327,7 @@ static void intel_iommu_aux_detach_device(struct iommu_domain *domain,
  * [IOMMU_CACHE_INV_TYPE_IOTLB][IOMMU_INV_GRANU_ADDR]
  */
 
-const static int
+static const int
 inv_type_granu_table[IOMMU_CACHE_INV_TYPE_NR][IOMMU_INV_GRANU_NR] = {
 	/*
 	 * PASID based IOTLB invalidation: PASID selective (per PASID),
Signature · 1 line
2.17.2 (Apple Git-113)
Acked-by on v1 1/1
#1 lore raw

Hi Qian,

Thanks!

Quoted 9 lines · Qian Cai

The commit 6ee1b77ba3ac ("iommu/vt-d: Add svm/sva invalidate function") introduced a GCC warning,

drivers/iommu/intel-iommu.c:5330:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration]
const static int
^~~~~

Fixes 6ee1b77ba3ac0 ("iommu/vt-d: Add svm/sva invalidate function")

Best regards,
baolu

Quoted 18 lines
---
  drivers/iommu/intel-iommu.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/intel-iommu.c +1 -1
index f75d7d9c231f..ff5a30a94679 100644
@@ -5327,7 +5327,7 @@ static void intel_iommu_aux_detach_device(struct iommu_domain *domain,
   * [IOMMU_CACHE_INV_TYPE_IOTLB][IOMMU_INV_GRANU_ADDR]
   */
 
-const static int
+static const int
  inv_type_granu_table[IOMMU_CACHE_INV_TYPE_NR][IOMMU_INV_GRANU_NR] = {
  	/*
  	 * PASID based IOTLB invalidation: PASID selective (per PASID),
Applied
#2 lore raw
In reply to Qian Cai
Quoted 8 lines · Qian Cai

The commit 6ee1b77ba3ac ("iommu/vt-d: Add svm/sva invalidate function") introduced a GCC warning,

drivers/iommu/intel-iommu.c:5330:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration]
const static int
^~~~~

Quoted 4 lines
---
 drivers/iommu/intel-iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.