Content-Type: multipart/mixed; boundary="===============1253813939654455351==" MIME-Version: 1.0 From: Julia Lawall To: kbuild-all@lists.01.org Subject: [PATCH] arm64: cpufeatures: use min and max Date: Thu, 29 Apr 2021 22:50:46 +0200 Message-ID: List-Id: --===============1253813939654455351== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kernel test robot Use min and max to make the effect more clear. Generated by: scripts/coccinelle/misc/minmax.cocci Fixes: 8636e3295ce3 ("coccinelle: misc: add minmax script") CC: Denis Efremov Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux.git f= or-5.12 head: 44e793b89bcfe586730f4c6ce3c66174dc07cb37 commit: 8636e3295ce33515c50ef728f0ff3800d97f9f44 [1/5] coccinelle: misc: ad= d minmax script :::::: branch date: 6 days ago :::::: commit date: 6 weeks ago cpufeature.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -695,14 +695,14 @@ static s64 arm64_ftr_safe_value(const st ret =3D ftrp->safe_val; break; case FTR_LOWER_SAFE: - ret =3D new < cur ? new : cur; + ret =3D min(new, cur); break; case FTR_HIGHER_OR_ZERO_SAFE: if (!cur || !new) break; fallthrough; case FTR_HIGHER_SAFE: - ret =3D new > cur ? new : cur; + ret =3D max(new, cur); break; default: BUG(); --===============1253813939654455351==--