[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7aeeb366-e28a-4b6c-a9c4-dd16882fd1a1@nvidia.com>
Date: Wed, 8 May 2024 13:32:20 -0700
From: John Hubbard <jhubbard@...dia.com>
To: Reinette Chatre <reinette.chatre@...el.com>, Shuah Khan <shuah@...nel.org>
CC: Nathan Chancellor <nathan@...nel.org>, Nick Desaulniers
<ndesaulniers@...gle.com>, Bill Wendling <morbo@...gle.com>, Justin Stitt
<justinstitt@...gle.com>, Fenghua Yu <fenghua.yu@...el.com>, Valentin Obst
<kernel@...entinobst.de>, <linux-kselftest@...r.kernel.org>, LKML
<linux-kernel@...r.kernel.org>, <llvm@...ts.linux.dev>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Subject: Re: [PATCH v3] selftests/resctrl: fix clang build warnings related to
abs(), labs() calls
On 5/8/24 1:24 PM, Reinette Chatre wrote:
> Hi John,
>
> On 5/8/2024 12:41 PM, John Hubbard wrote:
..
>> diff --git a/tools/testing/selftests/resctrl/mba_test.c b/tools/testing/selftests/resctrl/mba_test.c
>> index 7946e32e85c8..5fffbc9ff6a4 100644
>> --- a/tools/testing/selftests/resctrl/mba_test.c
>> +++ b/tools/testing/selftests/resctrl/mba_test.c
>> @@ -60,7 +60,7 @@ static bool show_mba_info(unsigned long *bw_imc, unsigned long *bw_resc)
>> /* Memory bandwidth from 100% down to 10% */
>> for (allocation = 0; allocation < ALLOCATION_MAX / ALLOCATION_STEP;
>> allocation++) {
>> - unsigned long avg_bw_imc, avg_bw_resc;
>> + long avg_bw_imc, avg_bw_resc;
>> unsigned long sum_bw_imc = 0, sum_bw_resc = 0;
>
> nit: since you are touching this line, could you please move it down one line to
> establish reverse fir order?
>
>> int avg_diff_per;
>> float avg_diff;
>> diff --git a/tools/testing/selftests/resctrl/mbm_test.c b/tools/testing/selftests/resctrl/mbm_test.c
>> index d67ffa3ec63a..a4c3ea49b0e8 100644
>> --- a/tools/testing/selftests/resctrl/mbm_test.c
>> +++ b/tools/testing/selftests/resctrl/mbm_test.c
>> @@ -17,7 +17,7 @@
>> static int
>> show_bw_info(unsigned long *bw_imc, unsigned long *bw_resc, size_t span)
>> {
>> - unsigned long avg_bw_imc = 0, avg_bw_resc = 0;
>> + long avg_bw_imc = 0, avg_bw_resc = 0;
>> unsigned long sum_bw_imc = 0, sum_bw_resc = 0;
>> int runs, ret, avg_diff_per;
>> float avg_diff = 0;
>
> Same nit here about reverse fir order.
>
> Thank you very much for sticking with this to fix the warnings.
> With the nitpicks addressed you can add:
> | Reviewed-by: Reinette Chatre <reinette.chatre@...el.com>
>
Sure, I'll post another one with those two changes and your rb,
thanks for the review(s)!
thanks,
--
John Hubbard
NVIDIA
Powered by blists - more mailing lists