arch: riscv: irq: fix build warning
In arch_irq_connect_dynamic the 'level' variable is only used on platforms that define CONFIG_RISCV_HAS_PLIC. For the other platforms we'll get a warning about an unused variable. Remove the need for 'level' and just call irq_get_level() where its needed to address the issue. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
071a986bb6
commit
a5cd799523
1 changed files with 1 additions and 5 deletions
|
@ -34,16 +34,12 @@ int arch_irq_connect_dynamic(unsigned int irq, unsigned int priority,
|
||||||
void (*routine)(void *parameter), void *parameter,
|
void (*routine)(void *parameter), void *parameter,
|
||||||
u32_t flags)
|
u32_t flags)
|
||||||
{
|
{
|
||||||
unsigned int level;
|
|
||||||
|
|
||||||
ARG_UNUSED(flags);
|
ARG_UNUSED(flags);
|
||||||
|
|
||||||
z_isr_install(irq, routine, parameter);
|
z_isr_install(irq, routine, parameter);
|
||||||
|
|
||||||
#if defined(CONFIG_RISCV_HAS_PLIC)
|
#if defined(CONFIG_RISCV_HAS_PLIC)
|
||||||
level = irq_get_level(irq);
|
if (irq_get_level(irq) == 2) {
|
||||||
|
|
||||||
if (level == 2) {
|
|
||||||
irq = irq_from_level_2(irq);
|
irq = irq_from_level_2(irq);
|
||||||
|
|
||||||
riscv_plic_set_priority(irq, priority);
|
riscv_plic_set_priority(irq, priority);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue