From 016c6bbaf18cb3f375972d9f7b2c3ff60a57a261 Mon Sep 17 00:00:00 2001 From: Ivan Safonov Date: Tue, 27 Oct 2015 22:20:28 +0700 Subject: [PATCH] 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8188eu/hal/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/staging/rtl8188eu/hal/phy.c index bb3c7773d74f..d3e8a8ea1829 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) { -- 2.20.1