Skip to content

Commit

Permalink
rtlwifi: Clean rtl_evm_db_to_percentage a bit
Browse files Browse the repository at this point in the history
Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  • Loading branch information
Priit Laes authored and Kalle Valo committed Mar 16, 2015
1 parent 387f149 commit 54fb66d
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions drivers/net/wireless/rtlwifi/stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,8 @@ EXPORT_SYMBOL(rtl_query_rxpwrpercentage);

u8 rtl_evm_db_to_percentage(char value)
{
char ret_val;
ret_val = value;

if (ret_val >= 0)
ret_val = 0;
if (ret_val <= -33)
ret_val = -33;
ret_val = 0 - ret_val;
ret_val *= 3;
char ret_val = clamp(-value, 0, 33) * 3;

if (ret_val == 99)
ret_val = 100;

Expand Down

0 comments on commit 54fb66d

Please sign in to comment.