提交 54fb66d6 编写于 作者: P Priit Laes 提交者: Kalle Valo

rtlwifi: Clean rtl_evm_db_to_percentage a bit

Signed-off-by: NPriit Laes <plaes@plaes.org>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 387f149a
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册