diff options
author | Ivan Safonov <insafonov@gmail.com> | 2015-10-27 15:20:28 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-29 00:09:08 (GMT) |
commit | 016c6bbaf18cb3f375972d9f7b2c3ff60a57a261 (patch) | |
tree | 02a7d7b9e8b6ac8b6e5da72787cc8500b8ea723d /drivers/staging/rtl8188eu | |
parent | 530c9b1b21fc41fd54c1c4f0f4b05368304c0105 (diff) | |
download | linux-016c6bbaf18cb3f375972d9f7b2c3ff60a57a261.tar.xz |
staging: rtl8188eu: abs kernel macro used in simularity_compare function
abs macro is useful for determining the difference between the two integers.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu')
-rw-r--r-- | drivers/staging/rtl8188eu/hal/phy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/staging/rtl8188eu/hal/phy.c index bb3c777..d3e8a8e 100644 --- a/drivers/staging/rtl8188eu/hal/phy.c +++ b/drivers/staging/rtl8188eu/hal/phy.c @@ -1013,7 +1013,7 @@ static bool simularity_compare(struct adapter *adapt, s32 resulta[][8], tmp2 = resulta[c2][i]; } - diff = (tmp1 > tmp2) ? (tmp1 - tmp2) : (tmp2 - tmp1); + diff = abs(tmp1 - tmp2); if (diff > MAX_TOLERANCE) { if ((i == 2 || i == 6) && !sim_bitmap) { |