* [PATCH] iommu: remove variable cnt
@ 2022-10-24 13:43 Colin Ian King
2022-10-24 20:33 ` Jerry Snitselaar
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Colin Ian King @ 2022-10-24 13:43 UTC (permalink / raw)
To: Joerg Roedel, Suravee Suthikulpanit, Will Deacon, Robin Murphy,
iommu
Cc: kernel-janitors, linux-kernel
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
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] iommu: remove variable cnt
2022-10-24 13:43 [PATCH] iommu: remove variable cnt Colin Ian King
@ 2022-10-24 20:33 ` Jerry Snitselaar
2022-10-25 10:56 ` Vasant Hegde
2022-11-03 14:40 ` Joerg Roedel
2 siblings, 0 replies; 4+ messages in thread
From: Jerry Snitselaar @ 2022-10-24 20:33 UTC (permalink / raw)
To: Colin Ian King
Cc: Joerg Roedel, Suravee Suthikulpanit, Will Deacon, Robin Murphy,
iommu, kernel-janitors, linux-kernel
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>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] iommu: remove variable cnt
2022-10-24 13:43 [PATCH] iommu: remove variable cnt Colin Ian King
2022-10-24 20:33 ` Jerry Snitselaar
@ 2022-10-25 10:56 ` Vasant Hegde
2022-11-03 14:40 ` Joerg Roedel
2 siblings, 0 replies; 4+ messages in thread
From: Vasant Hegde @ 2022-10-25 10:56 UTC (permalink / raw)
To: Colin Ian King, Joerg Roedel, Suravee Suthikulpanit, Will Deacon,
Robin Murphy, iommu
Cc: kernel-janitors, linux-kernel
On 10/24/2022 7:13 PM, 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>
Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
-Vasant
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iommu: remove variable cnt
2022-10-24 13:43 [PATCH] iommu: remove variable cnt Colin Ian King
2022-10-24 20:33 ` Jerry Snitselaar
2022-10-25 10:56 ` Vasant Hegde
@ 2022-11-03 14:40 ` Joerg Roedel
2 siblings, 0 replies; 4+ messages in thread
From: Joerg Roedel @ 2022-11-03 14:40 UTC (permalink / raw)
To: Colin Ian King
Cc: Suravee Suthikulpanit, Will Deacon, Robin Murphy, iommu,
kernel-janitors, linux-kernel
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(-)
Adjusted subject and applied to x86/amd branch, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-11-03 14:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-24 13:43 [PATCH] iommu: remove variable cnt Colin Ian King
2022-10-24 20:33 ` Jerry Snitselaar
2022-10-25 10:56 ` Vasant Hegde
2022-11-03 14:40 ` Joerg Roedel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox