diff options
author | Roberto Rodriguez Alkala <rralcala@gmail.com> | 2010-08-07 19:52:29 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-31 11:52:30 -0700 |
commit | bed49c69453641a2fd80d90f5a3b5204107eb459 (patch) | |
tree | c2e10093196735a81d75da9f3063624a21c79532 | |
parent | 1033f1f7ef3e0227eff68f236dc15d127ac550ff (diff) | |
download | linux-3.10-bed49c69453641a2fd80d90f5a3b5204107eb459.tar.gz linux-3.10-bed49c69453641a2fd80d90f5a3b5204107eb459.tar.bz2 linux-3.10-bed49c69453641a2fd80d90f5a3b5204107eb459.zip |
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>
-rw-r--r-- | drivers/staging/otus/80211core/ratectrl.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/staging/otus/80211core/ratectrl.c b/drivers/staging/otus/80211core/ratectrl.c index a1abe2f4f34..283b2b52638 100644 --- a/drivers/staging/otus/80211core/ratectrl.c +++ b/drivers/staging/otus/80211core/ratectrl.c @@ -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); |