Re: [PATCH] sfc: replace min/max nesting with clamp()

From
Edward Cree <ecree.xilinx@gmail.com>
Date
2025-08-14 13:31:41
Also in
lkml
Reply to
Xichao Zhao, 2025-08-12
On 12/08/2025 07:50, Xichao Zhao wrote:
The clamp() macro explicitly expresses the intent of constraining
a value within bounds.Therefore, replacing min(max(a, b), c) with
clamp(val, lo, hi) can improve code readability.

Signed-off-by: Xichao Zhao <redacted>
Reviewed-by: Edward Cree <ecree.xilinx@gmail.com>
Thread (5 messages) 5 messages, 5 authors, last reply 2025-08-17
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help