linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.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
Subject: [patch 5/5] include/asm-generic/topology.h: guard cpumask_of_node() macro argument
Date: Wed, 27 May 2020 22:20:55 -0700	[thread overview]
Message-ID: <20200528052055.nbIbqxl2c%akpm@linux-foundation.org> (raw)
In-Reply-To: <20200527222015.62ba8592af63dae12ab58ffe@linux-foundation.org>

From: Arnd Bergmann <arnd@arndb.de>
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 <arnd@arndb.de>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 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
_


  parent reply	other threads:[~2020-05-28  5:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28  5:20 incoming Andrew Morton
2020-05-28  5:20 ` [patch 1/5] mm/z3fold: silence kmemleak false positives of slots Andrew Morton
2020-05-28  5:20 ` [patch 2/5] mm,thp: stop leaking unreleased file pages Andrew Morton
2020-05-28  5:20 ` [patch 3/5] mm: remove VM_BUG_ON(PageSlab()) from page_mapcount() Andrew Morton
2020-05-28  5:20 ` [patch 4/5] fs/binfmt_elf.c: allocate initialized memory in fill_thread_core_info() Andrew Morton
2020-05-28  5:20 ` Andrew Morton [this message]
2020-05-28 20:10 ` incoming Linus Torvalds
2020-05-29 20:31   ` incoming Andrew Morton
2020-05-29 20:38     ` incoming Linus Torvalds
2020-05-29 21:12       ` incoming Andrew Morton
2020-05-29 21:20         ` incoming Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200528052055.nbIbqxl2c%akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=linux-mm@kvack.org \
    --cc=linux@roeck-us.net \
    --cc=mm-commits@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).