Re: [PATCH v11 08/23] x86/resctrl: Delete rdt_alloc_capable and rdt_mon_capable

From: Reinette Chatre

Date: Mon Sep 14 2026 - 16:51:04 EST


Hi Tony,

On 9/14/26 10:18 AM, Luck, Tony wrote:
> On Wed, Sep 09, 2026 at 08:57:04PM -0700, Reinette Chatre wrote:
>> On 8/31/26 10:44 AM, Tony Luck wrote:

..

>>> @@ -1026,10 +1019,12 @@ static __init void check_quirks(void)
>>>
>>> static __init bool get_rdt_resources(void)
>>> {
>>> - rdt_alloc_capable = get_rdt_alloc_resources();
>>> - rdt_mon_capable = get_rdt_mon_resources();
>>> + bool alloc_capable, mon_capable;
>>> +
>>> + alloc_capable = get_rdt_alloc_resources();
>>> + mon_capable = get_rdt_mon_resources();
>>>
>>> - return (rdt_mon_capable || rdt_alloc_capable);
>>> + return (mon_capable || alloc_capable);
>>
>> Are these new local variables really needed? Looks like this can just be a single
>> return statement ... which in turn makes get_rdt_resources() look unnecessary?
>
> I need to call both get_rdt_alloc_resources() and get_rdt_mon_resources()
> regardless of the return value of each. Changing this to:
>
> return get_rdt_mon_resources() || get_rdt_alloc_resources();
>
> would skip the call to get_rdt_alloc_resources() when get_rdt_mon_resources()
> returns "true".
>
> Am I missing something?

No. My mistake.

Reinette