Re: [PATCH] selftests: timers: Fix valid-adjtimex signed left-shift undefined behavior

2024-04-12 Thread Thomas Gleixner
Shuah! On Thu, Apr 11 2024 at 15:01, Shuah Khan wrote: > > Applied to linux-kselftest next for Linux6.10-rc1. I took this already through my tree as I have more timer selftest related stuff pending and coming up soon along with actual kernel changes. Thanks, tglx

Re: [PATCH] selftests: timers: Fix valid-adjtimex signed left-shift undefined behavior

2024-04-11 Thread Shuah Khan
On 4/9/24 14:22, John Stultz wrote: So, the struct adjtimex freq field takes a signed value who's units are in shifted (<<16) parts-per-million. Unfortunately for negative adjustments, the straightforward use of: freq = ppm<<16 will trip undefined behavior warnings with clang: valid-adj

Re: [PATCH] selftests: timers: Fix valid-adjtimex signed left-shift undefined behavior

2024-04-10 Thread Muhammad Usama Anjum
On 4/10/24 1:22 AM, John Stultz wrote: > So, the struct adjtimex freq field takes a signed value who's > units are in shifted (<<16) parts-per-million. > > Unfortunately for negative adjustments, the straightforward use > of: > freq = ppm<<16 > will trip undefined behavior warnings with clan

[PATCH] selftests: timers: Fix valid-adjtimex signed left-shift undefined behavior

2024-04-09 Thread John Stultz
So, the struct adjtimex freq field takes a signed value who's units are in shifted (<<16) parts-per-million. Unfortunately for negative adjustments, the straightforward use of: freq = ppm<<16 will trip undefined behavior warnings with clang: valid-adjtimex.c:66:6: warning: shifting a nega