Commit 6398d8a8 authored by Xichao Zhao's avatar Xichao Zhao Committed by Jakub Kicinski
Browse files

sfc: replace min/max nesting with clamp()



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: default avatarXichao Zhao <zhao.xichao@vivo.com>
Reviewed-by: default avatarJoe Damato <joe@dama.to>
Reviewed-by: default avatarEdward Cree <ecree.xilinx@gmail.com>
Link: https://patch.msgid.link/20250812065026.620115-1-zhao.xichao@vivo.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 6a18b85c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment