Skip to content

Commit 964aa56

Browse files
niedzwiecki-dawidkartben
authored andcommitted
interrupt_controller: intc_plic: move unused function
Move function that is used only if some configs are defined. Signed-off-by: Dawid Niedzwiecki <[email protected]>
1 parent 968dcc9 commit 964aa56

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/interrupt_controller/intc_plic.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,6 @@ static inline mem_addr_t get_threshold_priority_addr(const struct device *dev, u
196196
return config->reg + (get_hart_context(dev, hartid) * CONTEXT_SIZE);
197197
}
198198

199-
static ALWAYS_INLINE uint32_t local_irq_to_irq(const struct device *dev, uint32_t local_irq)
200-
{
201-
const struct plic_config *config = dev->config;
202-
203-
return irq_to_level_2(local_irq) | config->irq;
204-
}
205-
206199
#ifdef CONFIG_PLIC_SUPPORTS_SOFT_INTERRUPT
207200
static inline mem_addr_t get_pending_reg(const struct device *dev, uint32_t local_irq)
208201
{
@@ -718,6 +711,13 @@ static int cmd_stats_clear(const struct shell *sh, size_t argc, char *argv[])
718711
#endif /* CONFIG_PLIC_SHELL_IRQ_COUNT */
719712

720713
#ifdef CONFIG_PLIC_SHELL_IRQ_AFFINITY
714+
static ALWAYS_INLINE uint32_t local_irq_to_irq(const struct device *dev, uint32_t local_irq)
715+
{
716+
const struct plic_config *config = dev->config;
717+
718+
return irq_to_level_2(local_irq) | config->irq;
719+
}
720+
721721
static int cmd_affinity_set(const struct shell *sh, size_t argc, char **argv)
722722
{
723723
ARG_UNUSED(argc);

0 commit comments

Comments
 (0)