Skip to content

Commit

Permalink
tests: arch: arm_irq_vector_table: no explicit const array size
Browse files Browse the repository at this point in the history
We do not need to explicitly define the size of the const
array elements for the customized IRQ vector, used in the
test. The compiler should be able to infer the actual size
by counting the provided entries.

Signed-off-by: Ioannis Glaropoulos <[email protected]>
  • Loading branch information
ioannisg committed Oct 18, 2019
1 parent 2d8bd31 commit 1084e5b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,14 @@ typedef void (*vth)(void); /* Vector Table Handler */
void rtc1_nrf_isr(void);
void nrf_power_clock_isr(void);
#if defined(CONFIG_SOC_SERIES_NRF52X)
vth __irq_vector_table _irq_vector_table[RTC1_IRQn + 1] = {
vth __irq_vector_table _irq_vector_table[] = {
nrf_power_clock_isr,
isr0, isr1, isr2,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
rtc1_nrf_isr
};
#elif defined(CONFIG_SOC_SERIES_NRF91X)
vth __irq_vector_table _irq_vector_table[RTC1_IRQn + 1] = {
vth __irq_vector_table _irq_vector_table[] = {
0, 0, 0, 0, 0, nrf_power_clock_isr, 0, 0,
isr0, isr1, isr2,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Expand All @@ -185,12 +185,12 @@ vth __irq_vector_table _irq_vector_table[RTC1_IRQn + 1] = {
* the custom vector table to handle the timer "tick" interrupts.
*/
extern void rtc_isr(void);
vth __irq_vector_table _irq_vector_table[CONFIG_NUM_IRQS + 2] = {
vth __irq_vector_table _irq_vector_table[] = {
isr0, isr1, isr2, 0,
rtc_isr
};
#else
vth __irq_vector_table _irq_vector_table[CONFIG_NUM_IRQS] = {
vth __irq_vector_table _irq_vector_table[] = {
isr0, isr1, isr2
};
#endif /* CONFIG_SOC_SERIES_NRF52X || CONFIG_SOC_SERIES_NRF91X */
Expand Down

0 comments on commit 1084e5b

Please sign in to comment.