iommu/amd: Remove variable cnt ind iommu_poll_ga_log()
authorColin Ian King <colin.i.king@gmail.com>
Mon, 24 Oct 2022 13:43:01 +0000 (14:43 +0100)
committerJoerg Roedel <jroedel@suse.de>
Thu, 3 Nov 2022 14:39:23 +0000 (15:39 +0100)
Variable cnt is just being incremented and it's never used
anywhere else. The variable and the increment are redundant so
remove it.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Link: https://lore.kernel.org/r/20221024134301.2158939-1-colin.i.king@gmail.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/iommu.c

index d3b39d0..3847f3b 100644 (file)
@@ -767,7 +767,7 @@ EXPORT_SYMBOL(amd_iommu_register_ga_log_notifier);
 
 static void iommu_poll_ga_log(struct amd_iommu *iommu)
 {
-       u32 head, tail, cnt = 0;
+       u32 head, tail;
 
        if (iommu->ga_log == NULL)
                return;
@@ -780,7 +780,6 @@ static void iommu_poll_ga_log(struct amd_iommu *iommu)
                u64 log_entry;
 
                raw = (u64 *)(iommu->ga_log + head);
-               cnt++;
 
                /* Avoid memcpy function-call overhead */
                log_entry = *raw;