Change parameter name and emphasize that it is deliberately not used through a
comment followed by the statement '(void) data;'.
This also addresses a violation of MISRA C:2012 Rule 2.7 ("A function should
not contain unused parameters").
No functional change.
Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
---
xen/drivers/passthrough/amd/iommu_init.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/xen/drivers/passthrough/amd/iommu_init.c b/xen/drivers/passthrough/amd/iommu_init.c
index 9c01a49435..5bfaa6cdd4 100644
--- a/xen/drivers/passthrough/amd/iommu_init.c
+++ b/xen/drivers/passthrough/amd/iommu_init.c
@@ -692,7 +692,7 @@ static void iommu_check_ppr_log(struct amd_iommu *iommu)
spin_unlock_irqrestore(&iommu->lock, flags);
}
-static void cf_check do_amd_iommu_irq(void *unused)
+static void cf_check do_amd_iommu_irq(void *data)
{
struct amd_iommu *iommu;
@@ -702,6 +702,11 @@ static void cf_check do_amd_iommu_irq(void *unused)
return;
}
+ /*
+ * Formal parameter is deliberately unused.
+ */
+ (void) data;
+
/*
* No matter from where the interrupt came from, check all the
* IOMMUs present in the system. This allows for having just one
--
2.34.1