diff options
author | Dan Carpenter | 2014-07-31 12:29:18 +0300 |
---|---|---|
committer | Greg Kroah-Hartman | 2014-08-01 14:50:04 -0700 |
commit | 578dc59f20199c854507dd5f04839ffcaf655ce3 (patch) | |
tree | 3be9653d7fead0c131729c2366a1a4d2129ef82e | |
parent | 1a4493c55594842fa75a91ba95c73056a29f25e6 (diff) |
staging: comedi: ni_tio: remove some dead code
These conditions can never be true because "i" is always one more than
NI_660X_MAX_RTSI_CHAN after the loop.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/comedi/drivers/ni_tio.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/staging/comedi/drivers/ni_tio.c b/drivers/staging/comedi/drivers/ni_tio.c index fb7b271ac2a3..0525292c1d8b 100644 --- a/drivers/staging/comedi/drivers/ni_tio.c +++ b/drivers/staging/comedi/drivers/ni_tio.c @@ -1012,14 +1012,10 @@ static unsigned ni_660x_gate_to_generic_gate(unsigned gate) if (gate == NI_660X_RTSI_GATE_SEL(i)) return NI_GPCT_RTSI_GATE_SELECT(i); } - if (i <= NI_660X_MAX_RTSI_CHAN) - break; for (i = 0; i <= NI_660X_MAX_GATE_PIN; ++i) { if (gate == NI_660X_PIN_GATE_SEL(i)) return NI_GPCT_GATE_PIN_GATE_SELECT(i); } - if (i <= NI_660X_MAX_GATE_PIN) - break; BUG(); break; } @@ -1052,14 +1048,10 @@ static unsigned ni_m_gate_to_generic_gate(unsigned gate) if (gate == NI_M_RTSI_GATE_SEL(i)) return NI_GPCT_RTSI_GATE_SELECT(i); } - if (i <= NI_M_MAX_RTSI_CHAN) - break; for (i = 0; i <= NI_M_MAX_PFI_CHAN; ++i) { if (gate == NI_M_PFI_GATE_SEL(i)) return NI_GPCT_PFI_GATE_SELECT(i); } - if (i <= NI_M_MAX_PFI_CHAN) - break; BUG(); break; } @@ -1088,14 +1080,10 @@ static unsigned ni_660x_gate2_to_generic_gate(unsigned gate) if (gate == NI_660X_RTSI_GATE2_SEL(i)) return NI_GPCT_RTSI_GATE_SELECT(i); } - if (i <= NI_660X_MAX_RTSI_CHAN) - break; for (i = 0; i <= NI_660X_MAX_UP_DOWN_PIN; ++i) { if (gate == NI_660X_UD_PIN_GATE2_SEL(i)) return NI_GPCT_UP_DOWN_PIN_GATE_SELECT(i); } - if (i <= NI_660X_MAX_UP_DOWN_PIN) - break; BUG(); break; } |