Re: [PATCH v2] x86/resctrl: Fix unused variable warning in cache_alloc_hsw_probe()

From: Reinette Chatre
Date: Fri Nov 03 2023 - 16:24:16 EST




On 11/2/2023 3:50 PM, Luck, Tony wrote:
>> This does seem a valid issue and my Ack remains. I'm just puzzled why I do not
>> encounter the same warning.
>
> Reinette,
>
> Some other CONFIG option changing CFLAGS?
>
> Here's what I have for a "make V=1 W=1" for core.o
>

Tony and I went a bit more back-and-forth on this one and it appears that the
relevant code is optimized out in my build while the same did not happen
for him.

I can now trigger the warning by enabling Xen support, with CONFIG_PARAVIRT_XXL
causing rdmsr() to be replaced by paravirt_read_msr(). With the relevant code
no longer optimized out, the warning is triggered.

Thanks Tony!

Reinette