lkml.org 
[lkml]   [2023]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] x86/resctrl: Fix unused variable warning in cache_alloc_hsw_probe()
From
Hi Tony,

On 11/2/2023 3:02 PM, Luck, Tony wrote:
>> This is strange, I am not able to encounter this warning. Is my gcc perhaps
>> too old? I know there were some specific versions needed to reproduce similar
>> warnings with clang (see reference commit 793207bad71c ("x86/resctrl: Fix a silly
>> -Wunused-but-set-variable warning")).
>
> I'm using the default install from Fedora 38:
>
> $ gcc --version
> gcc (GCC) 13.2.1 20230728 (Red Hat 13.2.1-1)
> Copyright (C) 2023 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Thank you for confirming. I tested with the same version. Strange, I see other
instances of this warning but not the resctrl one:

$ grep "set but not used" ~/t/log | wc -l
20
$ grep resctrl ~/t/log
CC arch/x86/kernel/cpu/resctrl/core.o
CC arch/x86/kernel/cpu/resctrl/rdtgroup.o
CC arch/x86/kernel/cpu/resctrl/monitor.o
CC arch/x86/kernel/cpu/resctrl/ctrlmondata.o
CC arch/x86/kernel/cpu/resctrl/pseudo_lock.o
AR arch/x86/kernel/cpu/resctrl/built-in.a

This does seem a valid issue and my Ack remains. I'm just puzzled why I do not
encounter the same warning.

Reinette

\
 
 \ /
  Last update: 2023-11-02 23:24    [W:0.179 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site