iommu/amd: drop unused but set variable entry

Message ID CY8PR11MB777960FF31E255903D0EE664975A2@CY8PR11MB7779.namprd11.prod.outlook.com
State New
Headers
Series iommu/amd: drop unused but set variable entry |

Commit Message

Kunwu Chan Feb. 26, 2024, 1:56 a.m. UTC
  Fix compile warning:
drivers/iommu/amd/iommu.c: In function 'iommu_poll_ppr_log':
drivers/iommu/amd/iommu.c:833:21: Warning:
Variable 'entry' is set but not used [-Wunused-but-set-variable]

Commit d55b0d2e075a("iommu/amd: Remove PPR support")
removes the use of 'entry', but does not delete this variable.

Signed-off-by: Kunwu Chan <kunwu.chan@hotmail.com>
---
 drivers/iommu/amd/iommu.c | 5 -----
 1 file changed, 5 deletions(-)
  

Patch

diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
index 4283dd8191f0..de771a6420dc 100644
--- a/drivers/iommu/amd/iommu.c
+++ b/drivers/iommu/amd/iommu.c
@@ -831,7 +831,6 @@  static void iommu_poll_ppr_log(struct amd_iommu *iommu)
 
 	while (head != tail) {
 		volatile u64 *raw;
-		u64 entry[2];
 		int i;
 
 		raw = (u64 *)(iommu->ppr_log + head);
@@ -847,10 +846,6 @@  static void iommu_poll_ppr_log(struct amd_iommu *iommu)
 			udelay(1);
 		}
 
-		/* Avoid memcpy function-call overhead */
-		entry[0] = raw[0];
-		entry[1] = raw[1];
-
 		/*
 		 * To detect the hardware errata 733 we need to clear the
 		 * entry back to zero. This issue does not exist on SNP