aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/bus.h
diff options
context:
space:
mode:
authorJustin Hibbits <jhibbits@FreeBSD.org>2017-01-30 02:21:29 +0000
committerJustin Hibbits <jhibbits@FreeBSD.org>2017-01-30 02:21:29 +0000
commit0624255394b250006ba568052c25581336bc772c (patch)
treef454fd90b3aac7b1a25e71aeeb23378432666cb9 /sys/sys/bus.h
parent02f151d4129c60744b9f59666683ba7c664deaf5 (diff)
downloadsrc-0624255394b250006ba568052c25581336bc772c.tar.gz
src-0624255394b250006ba568052c25581336bc772c.zip
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
Notes
Notes: svn path=/head/; revision=312974
Diffstat (limited to 'sys/sys/bus.h')
-rw-r--r--sys/sys/bus.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/bus.h b/sys/sys/bus.h
index e9fca9b70cc8..03912978c512 100644
--- a/sys/sys/bus.h
+++ b/sys/sys/bus.h
@@ -265,6 +265,7 @@ enum intr_type {
};
enum intr_trigger {
+ INTR_TRIGGER_INVALID = -1,
INTR_TRIGGER_CONFORM = 0,
INTR_TRIGGER_EDGE = 1,
INTR_TRIGGER_LEVEL = 2