[PATCH v2 1/4] include/asm-generic/topology.h: Remove unused definition of cpumask_of_node()

John Garry posted 4 patches 1 month ago
[PATCH v2 1/4] include/asm-generic/topology.h: Remove unused definition of cpumask_of_node()
Posted by John Garry 1 month ago
The definition of cpumask_of_node() in question is guarded by conflicting
CONFIG_NUMA and !CONFIG_NUMA checks, so remove it.

Signed-off-by: John Garry <john.g.garry@oracle.com>
---
 include/asm-generic/topology.h | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h
index 4dbe715be65b4..9865ba48c5b16 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)
@@ -61,7 +57,7 @@
 				 cpumask_of_node(pcibus_to_node(bus)))
 #endif
 
-#endif	/* CONFIG_NUMA */
+#endif	/* !CONFIG_NUMA */
 
 #if !defined(CONFIG_NUMA) || !defined(CONFIG_HAVE_MEMORYLESS_NODES)
 
-- 
2.43.5
Re: [PATCH v2 1/4] include/asm-generic/topology.h: Remove unused definition of cpumask_of_node()
Posted by John Garry 1 week, 2 days ago
On 07/01/2026 09:40, John Garry wrote:
> The definition of cpumask_of_node() in question is guarded by conflicting
> CONFIG_NUMA and !CONFIG_NUMA checks, so remove it.

Arnd, can you consider picking this up please?

Thanks

> 
> Signed-off-by: John Garry <john.g.garry@oracle.com>
> ---
>   include/asm-generic/topology.h | 8 ++------
>   1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h
> index 4dbe715be65b4..9865ba48c5b16 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)
> @@ -61,7 +57,7 @@
>   				 cpumask_of_node(pcibus_to_node(bus)))
>   #endif
>   
> -#endif	/* CONFIG_NUMA */
> +#endif	/* !CONFIG_NUMA */
>   
>   #if !defined(CONFIG_NUMA) || !defined(CONFIG_HAVE_MEMORYLESS_NODES)
>
Re: [PATCH v2 1/4] include/asm-generic/topology.h: Remove unused definition of cpumask_of_node()
Posted by Arnd Bergmann 1 week, 2 days ago
On Fri, Jan 30, 2026, at 13:24, John Garry wrote:
> On 07/01/2026 09:40, John Garry wrote:
>> The definition of cpumask_of_node() in question is guarded by conflicting
>> CONFIG_NUMA and !CONFIG_NUMA checks, so remove it.
>
> Arnd, can you consider picking this up please?

Merged now, sorry missing this earlier.

     Arnd