Re: [PATCH] selftests/resctrl: fix clang build warnings related to abs(), labs() calls

2024-05-10 Thread John Hubbard
On 5/10/24 2:06 AM, Ilpo Järvinen wrote: On Wed, 8 May 2024, John Hubbard wrote: When building with clang, via: make LLVM=1 -C tools/testing/selftests ...two types of warnings occur: warning: absolute value function 'abs' given an argument of type 'long' but has parameter of t

Re: [PATCH] selftests/resctrl: fix clang build warnings related to abs(), labs() calls

2024-05-10 Thread Ilpo Järvinen
On Wed, 8 May 2024, John Hubbard wrote: > When building with clang, via: > > make LLVM=1 -C tools/testing/selftests > > ...two types of warnings occur: > > warning: absolute value function 'abs' given an argument of type > 'long' but has parameter of type 'int' which may cause trunc

Re: [PATCH] selftests/resctrl: fix clang build warnings related to abs(), labs() calls

2024-05-08 Thread John Hubbard
This was supposed to be a v3 patch. I'll resend as v3, sorry about creating a confusing email here. thanks, -- John Hubbard NVIDIA On 5/8/24 12:02 PM, John Hubbard wrote: When building with clang, via: make LLVM=1 -C tools/testing/selftests ...two types of warnings occur: warning:

[PATCH] selftests/resctrl: fix clang build warnings related to abs(), labs() calls

2024-05-08 Thread John Hubbard
When building with clang, via: make LLVM=1 -C tools/testing/selftests ...two types of warnings occur: warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value warning: taking the absolute valu

Re: [PATCH] selftests/resctrl: fix clang build warnings related to abs(), labs() calls

2024-05-06 Thread John Hubbard
On 5/6/24 2:07 AM, Ilpo Järvinen wrote: On Fri, 3 May 2024, John Hubbard wrote: On 5/3/24 11:37 AM, Reinette Chatre wrote: On 5/3/2024 9:52 AM, John Hubbard wrote: On 5/3/24 1:00 AM, Ilpo Järvinen wrote: On Thu, 2 May 2024, John Hubbard wrote: ... diff --git a/tools/testing/selftests/resct

Re: [PATCH] selftests/resctrl: fix clang build warnings related to abs(), labs() calls

2024-05-06 Thread Ilpo Järvinen
On Fri, 3 May 2024, John Hubbard wrote: > On 5/3/24 11:37 AM, Reinette Chatre wrote: > > On 5/3/2024 9:52 AM, John Hubbard wrote: > > > On 5/3/24 1:00 AM, Ilpo Järvinen wrote: > > > > On Thu, 2 May 2024, John Hubbard wrote: > > > ... > > > > > diff --git a/tools/testing/selftests/resctrl/mbm_test.

Re: [PATCH] selftests/resctrl: fix clang build warnings related to abs(), labs() calls

2024-05-03 Thread John Hubbard
On 5/3/24 1:46 PM, Reinette Chatre wrote: Hi John, On 5/3/2024 12:12 PM, John Hubbard wrote: On 5/3/24 11:37 AM, Reinette Chatre wrote: On 5/3/2024 9:52 AM, John Hubbard wrote: On 5/3/24 1:00 AM, Ilpo Järvinen wrote: On Thu, 2 May 2024, John Hubbard wrote: ... ... I assumed that this code

Re: [PATCH] selftests/resctrl: fix clang build warnings related to abs(), labs() calls

2024-05-03 Thread Reinette Chatre
Hi John, On 5/3/2024 12:12 PM, John Hubbard wrote: > On 5/3/24 11:37 AM, Reinette Chatre wrote: >> On 5/3/2024 9:52 AM, John Hubbard wrote: >>> On 5/3/24 1:00 AM, Ilpo Järvinen wrote: On Thu, 2 May 2024, John Hubbard wrote: >>> ... > diff --git a/tools/testing/selftests/resctrl/mbm_test.c

Re: [PATCH] selftests/resctrl: fix clang build warnings related to abs(), labs() calls

2024-05-03 Thread John Hubbard
On 5/3/24 11:37 AM, Reinette Chatre wrote: On 5/3/2024 9:52 AM, John Hubbard wrote: On 5/3/24 1:00 AM, Ilpo Järvinen wrote: On Thu, 2 May 2024, John Hubbard wrote: ... diff --git a/tools/testing/selftests/resctrl/mbm_test.c b/tools/testing/selftests/resctrl/mbm_test.c index d67ffa3ec63a..c87

Re: [PATCH] selftests/resctrl: fix clang build warnings related to abs(), labs() calls

2024-05-03 Thread Reinette Chatre
On 5/3/2024 9:52 AM, John Hubbard wrote: > On 5/3/24 1:00 AM, Ilpo Järvinen wrote: >> On Thu, 2 May 2024, John Hubbard wrote: > ... >>> diff --git a/tools/testing/selftests/resctrl/mbm_test.c >>> b/tools/testing/selftests/resctrl/mbm_test.c >>> index d67ffa3ec63a..c873793d016d 100644 >>> --- a/

Re: [PATCH] selftests/resctrl: fix clang build warnings related to abs(), labs() calls

2024-05-03 Thread John Hubbard
On 5/3/24 1:00 AM, Ilpo Järvinen wrote: On Thu, 2 May 2024, John Hubbard wrote: ... diff --git a/tools/testing/selftests/resctrl/mbm_test.c b/tools/testing/selftests/resctrl/mbm_test.c index d67ffa3ec63a..c873793d016d 100644 --- a/tools/testing/selftests/resctrl/mbm_test.c +++ b/tools/testing/

Re: [PATCH] selftests/resctrl: fix clang build warnings related to abs(), labs() calls

2024-05-03 Thread Ilpo Järvinen
On Thu, 2 May 2024, John Hubbard wrote: > First of all, in order to build with clang at all, one must first apply > Valentin Obst's build fix for LLVM [1]. Furthermore, for this particular > resctrl directory, my pending fix [2] must also be applied. Once those > fixes are in place, then when buil

[PATCH] selftests/resctrl: fix clang build warnings related to abs(), labs() calls

2024-05-02 Thread John Hubbard
First of all, in order to build with clang at all, one must first apply Valentin Obst's build fix for LLVM [1]. Furthermore, for this particular resctrl directory, my pending fix [2] must also be applied. Once those fixes are in place, then when building with clang, via: make LLVM=1 -C tools/t