summaryrefslogtreecommitdiff
path: root/rust/helpers/helpers.c
diff options
context:
space:
mode:
authorXichao Zhao <zhao.xichao@vivo.com>2025-08-12 14:50:26 +0800
committerJakub Kicinski <kuba@kernel.org>2025-08-14 17:48:29 -0700
commit6398d8a856fb8be01f53cf84b481b3cdac978607 (patch)
tree32febf26397e6e5ed46065ed8905323938e0cd15 /rust/helpers/helpers.c
parent6a18b85ca7d84486613d1857e49a656522bbe77c (diff)
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: Xichao Zhao <zhao.xichao@vivo.com> Reviewed-by: Joe Damato <joe@dama.to> Reviewed-by: Edward Cree <ecree.xilinx@gmail.com> Link: https://patch.msgid.link/20250812065026.620115-1-zhao.xichao@vivo.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions