lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <fcd37e67fba625da304fdaf07e0ab0db@208suo.com>
Date:   Wed, 14 Jun 2023 13:45:48 +0800
From:   wuyonggang001@...suo.com
To:     mturquette@...libre.com, sboyd@...nel.org
Cc:     linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] clk: baikal-t1: Using div64_ Ul replaces do_ Div() function

Fix the following coccicheck warning:

drivers/clk/baikal-t1/ccu-pll.c:81:1-7: WARNING: do_div() does a 
64-by-32 division, please consider using div64_ul instead.

Signed-off-by: Yonggang Wu <wuyonggang001@...suo.com>
---
  drivers/clk/baikal-t1/ccu-pll.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/baikal-t1/ccu-pll.c 
b/drivers/clk/baikal-t1/ccu-pll.c
index 13ef28001439..d41735c6956a 100644
--- a/drivers/clk/baikal-t1/ccu-pll.c
+++ b/drivers/clk/baikal-t1/ccu-pll.c
@@ -66,7 +66,7 @@ static inline unsigned long 
ccu_pll_lock_delay_us(unsigned long ref_clk,
  {
      u64 us = 500ULL * nr * USEC_PER_SEC;

-    do_div(us, ref_clk);
+    div64_ul(us, ref_clk);

      return us;
  }
@@ -78,9 +78,9 @@ static inline unsigned long ccu_pll_calc_freq(unsigned 
long ref_clk,
  {
      u64 tmp = ref_clk;

-    do_div(tmp, nr);
+    div64_ul(tmp, nr);
      tmp *= nf;
-    do_div(tmp, od);
+    div64_ul(tmp, od);

      return tmp;
  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ