diff options
author | Jeremy Kerr <[email protected]> | 2017-02-16 12:24:09 +0800 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2017-02-16 15:32:19 +0100 |
commit | 5d4bac9a5f4ef24b2482529bda6661a58e5b5b65 (patch) | |
tree | 1148ff3f04d9b22f1cb859829b0472b32fa75001 /net/lapb/lapb_subr.c | |
parent | 2f44e29cef006a4b0a4ecf7d4c5aac7d0fbb505c (diff) |
genirq: Clarify logic calculating bogus irqreturn_t values
Although irqreturn_t is an enum, we treat it (and its enumeration
constants) as a bitmask.
However, bad_action_ret() uses a less-than operator to determine whether
an irqreturn_t falls within allowable bit values, which means we need to
know the signededness of an enum type to read the logic, which is
implementation-dependent.
This change explicitly uses an unsigned type for the comparison. We do
this instead of changing to a bitwise test, as the latter compiles to
increased instructions in this hot path.
It looks like we get the correct behaviour currently (bad_action_ret(-1)
returns 1), so this is purely a readability fix.
Signed-off-by: Jeremy Kerr <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions