Skip to contentSkip to conversation

linux-4.11/arch/s390/kernel/time.c:417: bad function call ?

DISCUSSION Martin Schwidefsky 1 participant 1 message May 2, 2017 s390

lore
Share & tools
lore
#0 lore raw
Quoted 8 lines · On Tue, 2 May 2017 07:59:45 +0000 David Binderman <[email protected]> wrote:

linux-4.11/arch/s390/kernel/time.c:417]: (error) Shifting 32-bit value by 48 bits is undefined behaviour

Source code is

    if ((abs(tod_steering_delta) >> 48) != 0)

But the type of tod_steering_delta is long long. Suggest replace abs with llabs.

I wonder how you managed to get this error message. The abs definition in include/linux/kernel.h takes care of the type, it can be used with basically anything. And llabs does not exist for a kernel compile.

Signature · 4 lines
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.