mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-02-04 12:41:34 +00:00
bsps/powerpc/beatnik/irq/discovery_pic.c: Address type-limits warnings
This change was made to address GCC -Wtype-limits warnings. In this case, the irq was unsigned and there was no need to check it being <= 0.
This commit is contained in:
committed by
Gedare Bloom
parent
19cc585d2e
commit
3cf6df3cba
@@ -212,10 +212,14 @@ static void discovery_dump_picregs(void)
|
||||
static inline int
|
||||
validIrqNo(rtems_irq_number irq)
|
||||
{
|
||||
return
|
||||
irq >= BSP_PCI_IRQ_LOWEST_OFFSET
|
||||
&& irq <= BSP_PCI_IRQ_MAX_OFFSET
|
||||
&& ! (IMH_GPP_SUM & (1<<(irq-32)));
|
||||
/*
|
||||
* The GCC warning -Wtype-limits flagged that the
|
||||
* (irq >= BSP_PCI_IRQ_LOWEST_OFFSET) * part of the expression
|
||||
* was * not needed because irq is unsigned and
|
||||
* BSP_PCI_IRQ_LOWEST_OFFSET is 0.
|
||||
*/
|
||||
return (irq <= BSP_PCI_IRQ_MAX_OFFSET
|
||||
&& ! (IMH_GPP_SUM & (1<<(irq-32))));
|
||||
}
|
||||
|
||||
/* return 0 if a given priority is outside the valid range */
|
||||
|
||||
Reference in New Issue
Block a user