lkml.org 
[lkml]   [2022]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] iommu: remove variable cnt
On Mon, Oct 24, 2022 at 02:43:01PM +0100, Colin Ian King wrote:
> 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>
> ---
> drivers/iommu/amd/iommu.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
> index d3b39d0416fa..3847f3bdc568 100644
> --- a/drivers/iommu/amd/iommu.c
> +++ b/drivers/iommu/amd/iommu.c
> @@ -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;
> --
> 2.37.3
>

Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>

\
 
 \ /
  Last update: 2022-10-25 01:38    [W:0.061 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site