mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-07 09:09:23 +00:00
Staging: bcm: led_control.c: Removed dead code
This patch removes the never-entered else-block inside blink_in_normal_bandwidth(). The condition of the preceding if statement is always true. Signed-off-by: Matthias Beyer <mail@beyermatthias.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
60654a8417
commit
ea20548a82
1 changed files with 37 additions and 61 deletions
|
@ -108,74 +108,50 @@ static INT blink_in_normal_bandwidth(struct bcm_mini_adapter *ad,
|
||||||
enum bcm_led_events currdriverstate,
|
enum bcm_led_events currdriverstate,
|
||||||
ulong *timeout)
|
ulong *timeout)
|
||||||
{
|
{
|
||||||
bool bBlinkBothLED = TRUE;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Blink Tx and Rx LED when both Tx and Rx is
|
* Assign minimum number of blinks of
|
||||||
* in normal bandwidth
|
* either Tx or Rx.
|
||||||
*/
|
*/
|
||||||
if (bBlinkBothLED) {
|
if (*num_of_time_tx > *num_of_time_rx)
|
||||||
/*
|
*num_of_time = *num_of_time_rx;
|
||||||
* Assign minimum number of blinks of
|
else
|
||||||
* either Tx or Rx.
|
*num_of_time = *num_of_time_tx;
|
||||||
*/
|
if (*num_of_time > 0) {
|
||||||
if (*num_of_time_tx > *num_of_time_rx)
|
/* Blink both Tx and Rx LEDs */
|
||||||
*num_of_time = *num_of_time_rx;
|
if (LED_Blink(ad, 1 << GPIO_Num_tx,
|
||||||
else
|
uiTxLedIndex, *timeout,
|
||||||
*num_of_time = *num_of_time_tx;
|
*num_of_time, currdriverstate)
|
||||||
if (*num_of_time > 0) {
|
== EVENT_SIGNALED)
|
||||||
/* Blink both Tx and Rx LEDs */
|
return EVENT_SIGNALED;
|
||||||
if (LED_Blink(ad, 1 << GPIO_Num_tx,
|
|
||||||
uiTxLedIndex, *timeout,
|
|
||||||
*num_of_time, currdriverstate)
|
|
||||||
== EVENT_SIGNALED)
|
|
||||||
return EVENT_SIGNALED;
|
|
||||||
|
|
||||||
if (LED_Blink(ad, 1 << GPIO_Num_rx,
|
if (LED_Blink(ad, 1 << GPIO_Num_rx,
|
||||||
uiRxLedIndex, *timeout,
|
uiRxLedIndex, *timeout,
|
||||||
*num_of_time, currdriverstate)
|
*num_of_time, currdriverstate)
|
||||||
== EVENT_SIGNALED)
|
== EVENT_SIGNALED)
|
||||||
return EVENT_SIGNALED;
|
return EVENT_SIGNALED;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*num_of_time == *num_of_time_tx) {
|
if (*num_of_time == *num_of_time_tx) {
|
||||||
/* Blink pending rate of Rx */
|
/* Blink pending rate of Rx */
|
||||||
if (LED_Blink(ad, (1 << GPIO_Num_rx),
|
if (LED_Blink(ad, (1 << GPIO_Num_rx),
|
||||||
uiRxLedIndex, *timeout,
|
uiRxLedIndex, *timeout,
|
||||||
*num_of_time_rx - *num_of_time,
|
*num_of_time_rx - *num_of_time,
|
||||||
currdriverstate)
|
currdriverstate)
|
||||||
== EVENT_SIGNALED)
|
== EVENT_SIGNALED)
|
||||||
return EVENT_SIGNALED;
|
return EVENT_SIGNALED;
|
||||||
|
|
||||||
*num_of_time = *num_of_time_rx;
|
*num_of_time = *num_of_time_rx;
|
||||||
} else {
|
|
||||||
/* Blink pending rate of Tx */
|
|
||||||
if (LED_Blink(ad, 1 << GPIO_Num_tx,
|
|
||||||
uiTxLedIndex, *timeout,
|
|
||||||
*num_of_time_tx - *num_of_time,
|
|
||||||
currdriverstate)
|
|
||||||
== EVENT_SIGNALED)
|
|
||||||
return EVENT_SIGNALED;
|
|
||||||
|
|
||||||
*num_of_time = *num_of_time_tx;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (*num_of_time == *num_of_time_tx) {
|
/* Blink pending rate of Tx */
|
||||||
/* Blink pending rate of Rx */
|
if (LED_Blink(ad, 1 << GPIO_Num_tx,
|
||||||
if (LED_Blink(ad, 1 << GPIO_Num_tx,
|
uiTxLedIndex, *timeout,
|
||||||
uiTxLedIndex, *timeout,
|
*num_of_time_tx - *num_of_time,
|
||||||
*num_of_time, currdriverstate)
|
currdriverstate)
|
||||||
== EVENT_SIGNALED)
|
== EVENT_SIGNALED)
|
||||||
return EVENT_SIGNALED;
|
return EVENT_SIGNALED;
|
||||||
} else {
|
|
||||||
/* Blink pending rate of Tx */
|
*num_of_time = *num_of_time_tx;
|
||||||
if (LED_Blink(ad, 1 << GPIO_Num_rx,
|
|
||||||
uiRxLedIndex, *timeout,
|
|
||||||
*num_of_time, currdriverstate)
|
|
||||||
== EVENT_SIGNALED)
|
|
||||||
return EVENT_SIGNALED;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue