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>] [day] [month] [year] [list]
Message-Id: <1499327201-4805-1-git-send-email-opensource.ganesh@gmail.com>
Date:   Thu,  6 Jul 2017 15:46:41 +0800
From:   Ganesh Mahendran <opensource.ganesh@...il.com>
To:     linux-kernel@...r.kernel.org, corbet@....net, mingo@...nel.org,
        peterz@...radead.org, linux-doc@...r.kernel.org
Cc:     Ganesh Mahendran <opensource.ganesh@...il.com>
Subject: [PATCH] use macro SHIFT instead of hard code 32

32 is already defined as macro SHIFT, so it's better
to use macro SHIFT

Signed-off-by: Ganesh Mahendran <opensource.ganesh@...il.com>
---
 Documentation/scheduler/sched-pelt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/scheduler/sched-pelt.c b/Documentation/scheduler/sched-pelt.c
index e421913..726cb31 100644
--- a/Documentation/scheduler/sched-pelt.c
+++ b/Documentation/scheduler/sched-pelt.c
@@ -22,7 +22,7 @@ void calc_runnable_avg_yN_inv(void)
 
 	printf("static const u32 runnable_avg_yN_inv[] = {");
 	for (i = 0; i < HALFLIFE; i++) {
-		x = ((1UL<<32)-1)*pow(y, i);
+		x = ((1UL<<SHIFT)-1)*pow(y, i);
 
 		if (i % 6 == 0) printf("\n\t");
 		printf("0x%8x, ", x);
@@ -57,7 +57,7 @@ void calc_runnable_avg_yN_sum(void)
 
 void calc_converged_max(void)
 {
-	long last = 0, y_inv = ((1UL<<32)-1)*y;
+	long last = 0, y_inv = ((1UL<<SHIFT)-1)*y;
 
 	for (; ; n++) {
 		if (n > -1)
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ