From 0da653935f85044ceb17b9c1f7cc384cd06afcf4 Mon Sep 17 00:00:00 2001 From: "H. Nestler" <81570977+H-Nestler@users.noreply.github.com> Date: Mon, 4 Nov 2024 20:54:38 +0100 Subject: [PATCH] fix (warning): In function 'phydm_cfo_tracking': hal/phydm/phydm_cfotracking.c:490: warning: comparison is always false due to limited range of data type --- hal/phydm/phydm_cfotracking.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hal/phydm/phydm_cfotracking.c b/hal/phydm/phydm_cfotracking.c index 748556b..170be2c 100644 --- a/hal/phydm/phydm_cfotracking.c +++ b/hal/phydm/phydm_cfotracking.c @@ -487,10 +487,10 @@ void phydm_cfo_tracking(void *dm_void) if (dm->support_ic_type & (ODM_RTL8822C | ODM_RTL8814B | ODM_RTL8195B | ODM_RTL8812F|ODM_RTL8723F)) { - if (crystal_cap > 0x7F) + if (crystal_cap & ~0x7F) crystal_cap = 0x7F; } else { - if (crystal_cap > 0x3F) + if (crystal_cap & ~0x3F) crystal_cap = 0x3F; } if (crystal_cap < 0)