Re: [PATCH 05/10] minmax: simplify __clamp_once() by using is_const_false()

2024-12-09 Thread Vincent Mailhol
On Fri. 6 Dec. 2024 at 00:52, Vincent Mailhol wrote: > On Thu. 5 Dec. 2024 at 03:54, David Laight wrote: > > From: Vincent Mailhol > > > Sent: 02 December 2024 17:33 > > > > > > In __clamp_once(), > > > > > > __builtin_choose_expr(__is_constexpr((lo) > (hi)), (lo) <= (hi), true) > > > > > > is

Re: [PATCH 05/10] minmax: simplify __clamp_once() by using is_const_false()

2024-12-07 Thread Vincent Mailhol
On Thu. 5 Dec. 2024 at 03:54, David Laight wrote: > From: Vincent Mailhol > > Sent: 02 December 2024 17:33 > > > > In __clamp_once(), > > > > __builtin_choose_expr(__is_constexpr((lo) > (hi)), (lo) <= (hi), true) > > > > is equivalent to: > > > > !is_const_false((lo) <= (hi)) > > > > Apply is_

[PATCH 05/10] minmax: simplify __clamp_once() by using is_const_false()

2024-12-02 Thread Vincent Mailhol via B4 Relay
From: Vincent Mailhol In __clamp_once(), __builtin_choose_expr(__is_constexpr((lo) > (hi)), (lo) <= (hi), true) is equivalent to: !is_const_false((lo) <= (hi)) Apply is_const_false() to simplify __clamp_once(). Signed-off-by: Vincent Mailhol --- include/linux/minmax.h | 3 +-- 1 file c