staging: otus: fix compile warning and some style issues
In today linux-next I got a compile warning in staging/otus driver. This patch solves the issue and also improves the coding style. Signed-off-by: Roberto Rodriguez Alcala <rralcala@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
1033f1f7ef
commit
bed49c6945
@@ -422,23 +422,15 @@ u8_t zfRateCtrlRateDiff(struct zsRcCell* rcCell, u8_t retryRate)
|
|||||||
u16_t i;
|
u16_t i;
|
||||||
|
|
||||||
/* Find retryRate in operationRateSet[] */
|
/* Find retryRate in operationRateSet[] */
|
||||||
for (i=0; i<rcCell->operationRateCount; i++)
|
for (i = 0; i < rcCell->operationRateCount; i++) {
|
||||||
{
|
if (retryRate == rcCell->operationRateSet[i]) {
|
||||||
if (retryRate == rcCell->operationRateSet[i])
|
if (i < rcCell->currentRateIndex)
|
||||||
{
|
return ((rcCell->currentRateIndex - i)+1)>>1;
|
||||||
if (i < rcCell->currentRateIndex)
|
else if (i == rcCell->currentRateIndex && i == 0)
|
||||||
{
|
return 1;
|
||||||
return ((rcCell->currentRateIndex - i)+1)>>1;
|
else
|
||||||
}
|
return 0;
|
||||||
else if (i == rcCell->currentRateIndex == 0)
|
}
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* TODO : retry rate not in operation rate set */
|
/* TODO : retry rate not in operation rate set */
|
||||||
zm_msg1_tx(ZM_LV_0, "Not in operation rate set:", retryRate);
|
zm_msg1_tx(ZM_LV_0, "Not in operation rate set:", retryRate);
|
||||||
|
Reference in New Issue
Block a user