From: Ivan Safonov Date: Tue, 27 Oct 2015 15:20:28 +0000 (+0700) Subject: staging: rtl8188eu: abs kernel macro used in simularity_compare function X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=016c6bbaf18cb3f375972d9f7b2c3ff60a57a261;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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) {