HomeFreeBSD

Add a INTR_TRIG_INVALID, and use it in the powerpc interrupt code.

Description

Add a INTR_TRIG_INVALID, and use it in the powerpc interrupt code.

Summary:
Clang throws the following warning in powerpc intr_machdep:

/usr/src/sys/powerpc/powerpc/intr_machdep.c:454:15: warning: comparison of
constant -1 with expression of type 'enum intr_trigger' is always false
[-Wtautological-constant-out-of-range-compare]

if (i->trig == -1)
    ~~~~~~~ ^  ~~

This may lead to legitimate problems with aggressive optimizations, if not now
then in the future. To avoid this, add a new enum, INTR_TRIG_INVALID, set to
-1, and use this new enumeration in these checks.

Test Plan: Compile test.

Reviewed By: jhb, kib
Differential Revision: https://reviews.freebsd.org/D9300

Details

Provenance
jhibbitsAuthored on
Reviewer
jhb
Differential Revision
D9300: Add a INTR_TRIG_INVALID, and use it in the powerpc interrupt code.
Parents
rS312973: Add atomic_fcmpset_*() inlines for powerpc
Branches
Unknown
Tags
Unknown