[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7920126775c74fa5915afbeedcfe2058@AcuMS.aculab.com>
Date: Wed, 4 Dec 2024 16:11:33 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Dan Carpenter' <dan.carpenter@...aro.org>, Naresh Kamboju
<naresh.kamboju@...aro.org>
CC: "linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
clang-built-linux <llvm@...ts.linux.dev>, linux-block
<linux-block@...r.kernel.org>, open list <linux-kernel@...r.kernel.org>,
"lkft-triage@...ts.linaro.org" <lkft-triage@...ts.linaro.org>, "Linux
Regressions" <regressions@...ts.linux.dev>, Anders Roxell
<anders.roxell@...aro.org>, Arnd Bergmann <arnd@...db.de>, Nathan Chancellor
<nathan@...nel.org>, Jens Axboe <axboe@...nel.dk>
Subject: RE: s390: block/blk-iocost.c:1101:11: error: call to
'__compiletime_assert_557' declared with 'error' attribute: clamp() low limit
1 greater than high limit active
From: Dan Carpenter <dan.carpenter@...aro.org>
> Sent: 04 December 2024 14:39
>
> Let's add David to the Cc list because he's the expert on clamp().
The traceback info misses the important point.
I can't see the 'inlined from line 2225' message.
We have (line 1084):
static void __propagate_weights(struct ioc_gq *iocg, u32 active, u32 inuse,
bool save, struct ioc_now *now)
followed by:
inuse = clamp_t(u32, inuse, 1, active);
But line 2225 has:
__propagate_weights(iocg, 0, 0, false, now);
With aggressive inlining the compiler sees 'active == 0'
and the lo > hi test correctly triggers.
The previous version only verified 'lo <= hi' if it was a constant
integer expression - which it isn't here.
No idea what the code is trying to do, nor what value it expects
clamp(val, 1, 0) to generate - likely to be 0 or 1 depending on
the order of the comparisons.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists