[PATCH v2 09/12] bsps/irq: Use BSP_INTERRUPT_VECTOR_COUNT
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed Jun 23 17:45:39 UTC 2021
On 23/06/2021 18:07, Gedare Bloom wrote:
>> diff --git a/bsps/m68k/genmcf548x/irq/irq.c b/bsps/m68k/genmcf548x/irq/irq.c
>> index d010865152..547e851cdd 100644
>> --- a/bsps/m68k/genmcf548x/irq/irq.c
>> +++ b/bsps/m68k/genmcf548x/irq/irq.c
>> @@ -19,7 +19,7 @@
>> static inline bool is_valid_vector(rtems_vector_number vector)
>> {
>> return 1 <= vector
>> - && vector <= (rtems_vector_number) BSP_INTERRUPT_VECTOR_MAX;
>> + && vector < (rtems_vector_number) BSP_INTERRUPT_VECTOR_COUNT;
>> }
>>
> This one is weird. I don't know if there's an elegant solution though.
> The "BSP_INTERRUPT_VECTOR_COUNT" isn't actually the number of vectors
> in this BSP, since 0 is not a valid vector. However, I'm ok because
> BSP_INTERRUPT_VECTOR_COUNT is an upper bound on the number of vectors.
> Probably, this point needs to be documented carefully at least for
> this particular BSP.
This irq.c of this BSP is already not an elegant solution. I had to add
this hacked together glue layer to be able to use the interrupt server
for libbsd support. There is no functional change for this BSP.
--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax: +49-89-18 94 741 - 08
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
More information about the devel
mailing list