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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Wed, 17 May 2023 17:04:32 +0800
From:   sunying@...iscas.ac.cn
To:     arnd@...db.de
Cc:     linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
        Ying Sun <sunying@...iscas.ac.cn>
Subject: [PATCH] include/asm-generic/topology.h: remove dead code cpumask_of_node macro

From: Ying Sun <sunying@...iscas.ac.cn>

The macro of “cpumask_of_node(node)” in line 49 is a dead code
which will never be implemented,because its conditions of
line 30 "#ifndef CONFIG_NUMA" and line 48 "#ifdef CONFIG_NUMA"
are mutually exclusive. It is recommended to delete redundant code.

Suggested-by: Yanjie Ren <renyanjie01@...il.com>
Signed-off-by: Ying Sun <sunying@...iscas.ac.cn>
---
 include/asm-generic/topology.h | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h
index 4dbe715be65b..34f6d487d31a 100644
--- a/include/asm-generic/topology.h
+++ b/include/asm-generic/topology.h
@@ -45,11 +45,7 @@
 #endif
 
 #ifndef cpumask_of_node
-  #ifdef CONFIG_NUMA
-    #define cpumask_of_node(node)	((node) == 0 ? cpu_online_mask : cpu_none_mask)
-  #else
-    #define cpumask_of_node(node)	((void)(node), cpu_online_mask)
-  #endif
+  #define cpumask_of_node(node)	((void)(node), cpu_online_mask)
 #endif
 #ifndef pcibus_to_node
 #define pcibus_to_node(bus)	((void)(bus), -1)
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ