From 98f1ad258254d89ffb550a36d59caf9127a9d53f Mon Sep 17 00:00:00 2001 From: Joerg Roedel Date: Fri, 6 Jul 2012 13:28:37 +0200 Subject: iommu/amd: Fix sparse warnings A few sparse warnings fire in drivers/iommu/amd_iommu_init.c. Fix most of them with this patch. Also fix the sparse warnings in drivers/iommu/irq_remapping.c while at it. Signed-off-by: Joerg Roedel --- drivers/iommu/amd_iommu_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/iommu/amd_iommu_v2.c') diff --git a/drivers/iommu/amd_iommu_v2.c b/drivers/iommu/amd_iommu_v2.c index 036fe9bf157e..77c28b721741 100644 --- a/drivers/iommu/amd_iommu_v2.c +++ b/drivers/iommu/amd_iommu_v2.c @@ -81,7 +81,7 @@ struct fault { u16 flags; }; -struct device_state **state_table; +static struct device_state **state_table; static spinlock_t state_lock; /* List and lock for all pasid_states */ -- cgit v1.2.3 From 2c13d47a1a7ee8808796016c617aef25fd1d1925 Mon Sep 17 00:00:00 2001 From: Joerg Roedel Date: Thu, 19 Jul 2012 10:56:10 +0200 Subject: iommu/amd: Add missing spin_lock initialization Add missing spin_lock initialization in amd_iommu_bind_pasid() function and make lockdep happy again. Cc: stable@vger.kernel.org # >= v3.3 Signed-off-by: Joerg Roedel --- drivers/iommu/amd_iommu_v2.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/iommu/amd_iommu_v2.c') diff --git a/drivers/iommu/amd_iommu_v2.c b/drivers/iommu/amd_iommu_v2.c index 036fe9bf157e..a1f1bc876043 100644 --- a/drivers/iommu/amd_iommu_v2.c +++ b/drivers/iommu/amd_iommu_v2.c @@ -681,6 +681,8 @@ int amd_iommu_bind_pasid(struct pci_dev *pdev, int pasid, atomic_set(&pasid_state->count, 1); init_waitqueue_head(&pasid_state->wq); + spin_lock_init(&pasid_state->lock); + pasid_state->task = task; pasid_state->mm = get_task_mm(task); pasid_state->device_state = dev_state; -- cgit v1.2.3 From 07db04098d1e2f238959c858a0d63243157695f9 Mon Sep 17 00:00:00 2001 From: Masanari Iida Date: Sun, 22 Jul 2012 02:21:32 +0900 Subject: iommu: Fix typo in iommu Correct spelling typo in debug messages and comments in drivers/iommu. Signed-off-by: Masanari Iida Signed-off-by: Jiri Kosina --- drivers/iommu/amd_iommu_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/iommu/amd_iommu_v2.c') diff --git a/drivers/iommu/amd_iommu_v2.c b/drivers/iommu/amd_iommu_v2.c index 036fe9bf157e..be03238ad815 100644 --- a/drivers/iommu/amd_iommu_v2.c +++ b/drivers/iommu/amd_iommu_v2.c @@ -924,7 +924,7 @@ static int __init amd_iommu_v2_init(void) pr_info("AMD IOMMUv2 driver by Joerg Roedel \n"); if (!amd_iommu_v2_supported()) { - pr_info("AMD IOMMUv2 functionality not available on this sytem\n"); + pr_info("AMD IOMMUv2 functionality not available on this system\n"); /* * Load anyway to provide the symbols to other modules * which may use AMD IOMMUv2 optionally. -- cgit v1.2.3