Changeset f8b6359 in rtems


Ignore:
Timestamp:
Jan 28, 2021, 9:31:07 AM (5 weeks ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
44ae183
Parents:
fcbefb5
git-author:
Sebastian Huber <sebastian.huber@…> (01/28/21 09:31:07)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/28/21 10:12:43)
Message:

bsp/leon3: Simplify bsp_interrupt_is_valid_vector()

There is not need to check that vector >= BSP_INTERRUPT_VECTOR_MIN since
BSP_INTERRUPT_VECTOR_MIN is zero and vector is unsigned.

This fix relates to CID 1399742 (NO_EFFECT).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bsps/sparc/leon3/include/bsp/irq.h

    rfcbefb5 rf8b6359  
    3636static inline bool bsp_interrupt_is_valid_vector(rtems_vector_number vector)
    3737{
    38   return (rtems_vector_number) BSP_INTERRUPT_VECTOR_MIN <= vector
    39     && ((vector <= (rtems_vector_number) BSP_INTERRUPT_VECTOR_MAX_STD &&
    40         LEON3_IrqCtrl_EIrq == 0) ||
    41        (vector <= (rtems_vector_number) BSP_INTERRUPT_VECTOR_MAX_EXT &&
    42         LEON3_IrqCtrl_EIrq != 0));
     38  if (LEON3_IrqCtrl_EIrq != 0) {
     39    return vector <= BSP_INTERRUPT_VECTOR_MAX_EXT;
     40  } else {
     41    return vector <= BSP_INTERRUPT_VECTOR_MAX_STD;
     42  }
    4343}
    4444
Note: See TracChangeset for help on using the changeset viewer.