linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Randy Dunlap <rdunlap@infradead.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Naveen Krishna Chatradhi <nchatrad@amd.com>,
	"linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>
Subject: Re: linux-next: Tree for May 26 (hwmon/amd_energy.c)
Date: Tue, 26 May 2020 10:14:11 -0700	[thread overview]
Message-ID: <c31504dc-9646-81f9-c262-88890556ece9@roeck-us.net> (raw)
In-Reply-To: <f050c447-18fa-50d0-dbdd-b60820dc7ba1@infradead.org>

On 5/26/20 9:24 AM, Randy Dunlap wrote:
> On 5/26/20 3:39 AM, Stephen Rothwell wrote:
>> Hi all,
>>
>> News: there will be no linux-next release tomorrow.
>>
>> Changes since 20200525:
>>
> 
> Hi,
> 
> All of my drivers/hwmon/amd_energy.c builds are failing (on i386 or x86_64).
> 
I don't see that, neither in my hwmon-next branch (on top of v5.7-rc6)
nor with next-20200526.

Ah yes, you must have NUMA and NEED_MULTIPLE_NODES disabled.
With that (allnoconfig+HWMON+SENSORS_AMD_ENERGY), I see the error as well.
The problem is:

	#define cpumask_of_node(node)       ((void)node, cpu_online_mask)

The caller passes node as "channel - data->nr_cpus", which I would argue
is perfectly valid. This is converted to

	#define cpumask_of_node(node)       ((void)channel - data->nr_cpus, cpu_online_mask)

which doesn't look that good and results in the error. The problem
is the missing ( ) around node, not the amd_energy driver.

Do you want to submit a patch, or do you want me to do it ?

Thanks,
Guenter

> 
> $ gcc --version
> gcc (SUSE Linux) 7.5.0
> 
> 
>   CC      drivers/hwmon/amd_energy.o
> In file included from ../arch/x86/include/asm/cpumask.h:5:0,
>                  from ../arch/x86/include/asm/msr.h:11,
>                  from ../arch/x86/include/asm/processor.h:22,
>                  from ../arch/x86/include/asm/cpu_device_id.h:16,
>                  from ../drivers/hwmon/amd_energy.c:6:
> ../drivers/hwmon/amd_energy.c: In function 'amd_energy_read':
> ../include/asm-generic/topology.h:51:36: error: void value not ignored as it ought to be
>      #define cpumask_of_node(node) ((void)node, cpu_online_mask)
> ../include/linux/cpumask.h:618:72: note: in definition of macro 'cpumask_first_and'
>  #define cpumask_first_and(src1p, src2p) cpumask_next_and(-1, (src1p), (src2p))
>                                                                         ^~~~~
> ../drivers/hwmon/amd_energy.c:194:6: note: in expansion of macro 'cpumask_of_node'
>       cpumask_of_node
>       ^~~~~~~~~~~~~~~
> ../include/asm-generic/topology.h:51:46: warning: left-hand operand of comma expression has no effect [-Wunused-value]
>      #define cpumask_of_node(node) ((void)node, cpu_online_mask)
>                                               ^
> ../include/linux/cpumask.h:618:72: note: in definition of macro 'cpumask_first_and'
>  #define cpumask_first_and(src1p, src2p) cpumask_next_and(-1, (src1p), (src2p))
>                                                                         ^~~~~
> ../drivers/hwmon/amd_energy.c:194:6: note: in expansion of macro 'cpumask_of_node'
>       cpumask_of_node
>       ^~~~~~~~~~~~~~~
> 
> 
> thanks.
> 


  reply	other threads:[~2020-05-26 17:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-26 10:39 linux-next: Tree for May 26 Stephen Rothwell
2020-05-26 15:46 ` linux-next: Tree for May 26 (drivers/crypto/chelsio/chcr_ktls.c) Randy Dunlap
2020-05-26 16:24 ` linux-next: Tree for May 26 (hwmon/amd_energy.c) Randy Dunlap
2020-05-26 17:14   ` Guenter Roeck [this message]
2020-05-26 17:17     ` Randy Dunlap

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=c31504dc-9646-81f9-c262-88890556ece9@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=nchatrad@amd.com \
    --cc=rdunlap@infradead.org \
    --cc=sfr@canb.auug.org.au \
    /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).