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

- From: Edward Cree \<ecree.xilinx@gmail.com\>
- Date: 2025-08-14 13:31:41 
- List: netdev
- Page: https://ratatoskr.run/netdev/2025/08/3170337
- Thread: https://ratatoskr.run/netdev/2025/08/3165900/t.md

```text
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>
```
