Re: linux-next: Tree for May 26 (hwmon/amd_energy.c)

From: Randy Dunlap
Date: Tue May 26 2020 - 13:17:23 EST


On 5/26/20 10:14 AM, Guenter Roeck wrote:
> 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 ?

You go ahead, please.

thanks.
--
~Randy