Skip to content

Commit

Permalink
AMD/IOMMU: drop tasklet handler forward declaration
Browse files Browse the repository at this point in the history
do_amd_iommu_irq()'s forward declaration uses a parameter name different
from what the definition uses, thus vioating Misra C:2012 rule 8.3. We
can get away without such a forward declaration if instead we forward-
declare amd_iommu_irq_tasklet, putting its initialization past the
handler function's definition.

No functional change.

Signed-off-by: Jan Beulich <[email protected]>
Acked-by: Andrew Cooper <[email protected]>
  • Loading branch information
jbeulich committed Nov 3, 2023
1 parent b6c7951 commit 5ae0a4a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xen/drivers/passthrough/amd/iommu_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
static int __initdata nr_amd_iommus;
static bool __initdata pci_init;

static void cf_check do_amd_iommu_irq(void *data);
static DECLARE_SOFTIRQ_TASKLET(amd_iommu_irq_tasklet, do_amd_iommu_irq, NULL);
static struct tasklet amd_iommu_irq_tasklet;

unsigned int __read_mostly amd_iommu_acpi_info;
unsigned int __read_mostly ivrs_bdf_entries;
Expand Down Expand Up @@ -715,6 +714,8 @@ static void cf_check do_amd_iommu_irq(void *unused)
}
}

static DECLARE_SOFTIRQ_TASKLET(amd_iommu_irq_tasklet, do_amd_iommu_irq, NULL);

static void cf_check iommu_interrupt_handler(
int irq, void *dev_id, struct cpu_user_regs *regs)
{
Expand Down

0 comments on commit 5ae0a4a

Please sign in to comment.