linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Naveen Krishna Chatradhi <nchatrad@amd.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Ingo Molnar <mingo@redhat.com>, Tony Luck <tony.luck@intel.com>,
	Ralf Baechle <ralf@linux-mips.org>,
	Richard Henderson <rth@twiddle.net>,
	linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpumask: guard cpumask_of_node() macro argument
Date: Wed, 27 May 2020 07:51:38 -0700	[thread overview]
Message-ID: <20200527145138.GB209591@roeck-us.net> (raw)
In-Reply-To: <20200527134623.930247-1-arnd@arndb.de>

On Wed, May 27, 2020 at 03:46:08PM +0200, Arnd Bergmann wrote:
> 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))
>                                                                        ^~~~~
> 
> 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>

Didn't I Cc: you on the same patch I sent out earlier ? Never mind, though.

Acked-by: Guenter Roeck <linux@roeck-us.net>

Guenter

> ---
>  include/asm-generic/topology.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h
> index 238873739550..5aa8705df87e 100644
> --- a/include/asm-generic/topology.h
> +++ b/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
> -- 
> 2.26.2
> 

      reply	other threads:[~2020-05-27 14:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27 13:46 [PATCH] cpumask: guard cpumask_of_node() macro argument Arnd Bergmann
2020-05-27 14:51 ` Guenter Roeck [this message]

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=20200527145138.GB209591@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=nchatrad@amd.com \
    --cc=ralf@linux-mips.org \
    --cc=rth@twiddle.net \
    --cc=rusty@rustcorp.com.au \
    --cc=tony.luck@intel.com \
    /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).