Changeset 9361412 in rtems


Ignore:
Timestamp:
Oct 18, 2016, 10:21:21 PM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
f94155b
Parents:
24fe213
Message:

bsp/leon3: Avoid implicit integer conversions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/leon3/include/leon.h

    r24fe213 r9361412  
    187187#define LEON_Clear_interrupt( _source ) \
    188188  do { \
    189     LEON3_IrqCtrl_Regs->iclear = (1 << (_source)); \
     189    LEON3_IrqCtrl_Regs->iclear = (1U << (_source)); \
    190190  } while (0)
    191191
    192192#define LEON_Force_interrupt( _source ) \
    193193  do { \
    194     LEON3_IrqCtrl_Regs->iforce = (1 << (_source)); \
     194    LEON3_IrqCtrl_Regs->iforce = (1U << (_source)); \
    195195  } while (0)
    196196
     
    214214
    215215#define LEON_Is_interrupt_pending( _source ) \
    216   (LEON3_IrqCtrl_Regs->ipend & (1 << (_source)))
     216  (LEON3_IrqCtrl_Regs->ipend & (1U << (_source)))
    217217
    218218#define LEON_Cpu_Is_interrupt_masked( _source, _cpu ) \
    219      (!(LEON3_IrqCtrl_Regs->mask[_cpu] & (1 << (_source))))
     219     (!(LEON3_IrqCtrl_Regs->mask[_cpu] & (1U << (_source))))
    220220
    221221#define LEON_Cpu_Mask_interrupt( _source, _cpu ) \
     
    223223    rtems_interrupt_lock_context _lock_context; \
    224224    LEON3_IRQCTRL_ACQUIRE( &_lock_context ); \
    225      LEON3_IrqCtrl_Regs->mask[_cpu]  &= ~(1 << (_source)); \
     225     LEON3_IrqCtrl_Regs->mask[_cpu]  &= ~(1U << (_source)); \
    226226    LEON3_IRQCTRL_RELEASE( &_lock_context ); \
    227227  } while (0)
     
    231231    rtems_interrupt_lock_context _lock_context; \
    232232    LEON3_IRQCTRL_ACQUIRE( &_lock_context ); \
    233     LEON3_IrqCtrl_Regs->mask[_cpu]  |= (1 << (_source)); \
     233    LEON3_IrqCtrl_Regs->mask[_cpu]  |= (1U << (_source)); \
    234234    LEON3_IRQCTRL_RELEASE( &_lock_context ); \
    235235  } while (0)
     
    238238  do { \
    239239    rtems_interrupt_lock_context _lock_context; \
    240     uint32_t _mask = 1 << (_source); \
     240    uint32_t _mask = 1U << (_source); \
    241241    LEON3_IRQCTRL_ACQUIRE( &_lock_context ); \
    242242     (_previous) = LEON3_IrqCtrl_Regs->mask[_cpu]; \
     
    249249  do { \
    250250    rtems_interrupt_lock_context _lock_context; \
    251     uint32_t _mask = 1 << (_source); \
     251    uint32_t _mask = 1U << (_source); \
    252252    LEON3_IRQCTRL_ACQUIRE( &_lock_context ); \
    253253      LEON3_IrqCtrl_Regs->mask[_cpu] = \
Note: See TracChangeset for help on using the changeset viewer.