* [patch] staging: comedi: ni_tio: remove some dead code
@ 2014-07-31 9:29 Dan Carpenter
2014-07-31 9:47 ` Ian Abbott
2014-07-31 17:35 ` Hartley Sweeten
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2014-07-31 9:29 UTC (permalink / raw)
To: kernel-janitors
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>
diff --git a/drivers/staging/comedi/drivers/ni_tio.c b/drivers/staging/comedi/drivers/ni_tio.c
index f9f6320..9d4b46c 100644
--- a/drivers/staging/comedi/drivers/ni_tio.c
+++ b/drivers/staging/comedi/drivers/ni_tio.c
@@ -1041,14 +1041,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;
}
@@ -1081,14 +1077,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;
}
@@ -1117,14 +1109,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;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch] staging: comedi: ni_tio: remove some dead code
2014-07-31 9:29 [patch] staging: comedi: ni_tio: remove some dead code Dan Carpenter
@ 2014-07-31 9:47 ` Ian Abbott
2014-07-31 17:35 ` Hartley Sweeten
1 sibling, 0 replies; 3+ messages in thread
From: Ian Abbott @ 2014-07-31 9:47 UTC (permalink / raw)
To: kernel-janitors
On 2014-07-31 10:29, Dan Carpenter wrote:
> 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: Ian Abbott <abbotti@mev.co.uk>
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [patch] staging: comedi: ni_tio: remove some dead code
2014-07-31 9:29 [patch] staging: comedi: ni_tio: remove some dead code Dan Carpenter
2014-07-31 9:47 ` Ian Abbott
@ 2014-07-31 17:35 ` Hartley Sweeten
1 sibling, 0 replies; 3+ messages in thread
From: Hartley Sweeten @ 2014-07-31 17:35 UTC (permalink / raw)
To: kernel-janitors
On Thursday, July 31, 2014 2:29 AM, Dan Carpenter wrote:
> 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>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-31 17:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-31 9:29 [patch] staging: comedi: ni_tio: remove some dead code Dan Carpenter
2014-07-31 9:47 ` Ian Abbott
2014-07-31 17:35 ` Hartley Sweeten
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.