From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: [patch 5/5] include/asm-generic/topology.h: guard cpumask_of_node() macro argument Date: Wed, 27 May 2020 22:20:55 -0700 Message-ID: <20200528052055.nbIbqxl2c%akpm@linux-foundation.org> References: <20200527222015.62ba8592af63dae12ab58ffe@linux-foundation.org> Reply-To: linux-kernel@vger.kernel.org Return-path: Received: from mail.kernel.org ([198.145.29.99]:45518 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725764AbgE1FU4 (ORCPT ); Thu, 28 May 2020 01:20:56 -0400 In-Reply-To: <20200527222015.62ba8592af63dae12ab58ffe@linux-foundation.org> Sender: mm-commits-owner@vger.kernel.org List-Id: mm-commits@vger.kernel.org To: akpm@linux-foundation.org, arnd@arndb.de, linux-mm@kvack.org, linux@roeck-us.net, mm-commits@vger.kernel.org, torvalds@linux-foundation.org From: Arnd Bergmann Subject: include/asm-generic/topology.h: guard cpumask_of_node() macro argument drivers/hwmon/amd_energy.c:195:15: error: invalid operands to binary expression ('void' and 'int') (channel - data->nr_cpus)); ~~~~~~~~~^~~~~~~~~~~~~~~~~ include/asm-generic/topology.h:51:42: note: expanded from macro 'cpumask_of_node' #define cpumask_of_node(node) ((void)node, cpu_online_mask) ^~~~ include/linux/cpumask.h:618:72: note: expanded from macro 'cpumask_first_and' #define cpumask_first_and(src1p, src2p) cpumask_next_and(-1, (src1p), (src2p)) ^~~~~ Link: http://lkml.kernel.org/r/20200527134623.930247-1-arnd@arndb.de Fixes: f0b848ce6fe9 ("cpumask: Introduce cpumask_of_{node,pcibus} to replace {node,pcibus}_to_cpumask") Fixes: 8abee9566b7e ("hwmon: Add amd_energy driver to report energy counters") Signed-off-by: Arnd Bergmann Acked-by: Guenter Roeck Signed-off-by: Andrew Morton --- include/asm-generic/topology.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/asm-generic/topology.h~cpumask-guard-cpumask_of_node-macro-argument +++ a/include/asm-generic/topology.h @@ -48,7 +48,7 @@ #ifdef CONFIG_NEED_MULTIPLE_NODES #define cpumask_of_node(node) ((node) == 0 ? cpu_online_mask : cpu_none_mask) #else - #define cpumask_of_node(node) ((void)node, cpu_online_mask) + #define cpumask_of_node(node) ((void)(node), cpu_online_mask) #endif #endif #ifndef pcibus_to_node _