Skip to content

Commit

Permalink
staging: otus: fix compile warning and some style issues
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roberto Rodriguez Alkala authored and Greg Kroah-Hartman committed Aug 31, 2010
1 parent 1033f1f commit bed49c6
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions drivers/staging/otus/80211core/ratectrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,23 +422,15 @@ u8_t zfRateCtrlRateDiff(struct zsRcCell* rcCell, u8_t retryRate)
u16_t i;

/* Find retryRate in operationRateSet[] */
for (i=0; i<rcCell->operationRateCount; i++)
{
if (retryRate == rcCell->operationRateSet[i])
{
if (i < rcCell->currentRateIndex)
{
return ((rcCell->currentRateIndex - i)+1)>>1;
}
else if (i == rcCell->currentRateIndex == 0)
{
return 1;
}
else
{
return 0;
}
}
for (i = 0; i < rcCell->operationRateCount; i++) {
if (retryRate == rcCell->operationRateSet[i]) {
if (i < rcCell->currentRateIndex)
return ((rcCell->currentRateIndex - i)+1)>>1;
else if (i == rcCell->currentRateIndex && i == 0)
return 1;
else
return 0;
}
}
/* TODO : retry rate not in operation rate set */
zm_msg1_tx(ZM_LV_0, "Not in operation rate set:", retryRate);
Expand Down

0 comments on commit bed49c6

Please sign in to comment.