diff options
author | Nathan Chancellor <[email protected]> | 2020-01-16 15:26:58 -0700 |
---|---|---|
committer | Jason Gunthorpe <[email protected]> | 2020-01-25 15:33:53 -0400 |
commit | 79ba4f9310673a8870fda5a062a558923fa65c93 (patch) | |
tree | 6fb568a025f62b4df444cea49362839402671eef /scripts/gcc-plugins/cyc_complexity_plugin.c | |
parent | 13e0af1801f2e74639b4eadb69ed1fad2cf802f7 (diff) |
IB/hfi1: Fix logical condition in msix_request_irq
Clang warns:
drivers/infiniband/hw/hfi1/msix.c:136:22: warning: overlapping
comparisons always evaluate to false [-Wtautological-overlap-compare]
if (type < IRQ_SDMA && type >= IRQ_OTHER)
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
1 warning generated.
It is impossible for something to be less than 0 (IRQ_SDMA) and greater
than or equal to 3 (IRQ_OTHER) at the same time. A logical OR should
have been used to keep the same logic as before.
Link: https://lore.kernel.org/r/[email protected]
Link: https://github.com/ClangBuiltLinux/linux/issues/841
Fixes: 13d2a8384bd9 ("IB/hfi1: Decouple IRQ name from type")
Signed-off-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nick Desaulniers <[email protected]>
Acked-by: Dennis Dalessandro <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/cyc_complexity_plugin.c')
0 files changed, 0 insertions, 0 deletions