lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aJuCpLbCbYJg_MPF@MacBook-Air.local>
Date: Tue, 12 Aug 2025 11:06:28 -0700
From: Joe Damato <joe@...a.to>
To: Xichao Zhao <zhao.xichao@...o.com>
Cc: ecree.xilinx@...il.com, andrew+netdev@...n.ch, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
	netdev@...r.kernel.org, linux-net-drivers@....com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sfc: replace min/max nesting with clamp()

On Tue, Aug 12, 2025 at 02:50:26PM +0800, 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 <zhao.xichao@...o.com>
> ---
>  drivers/net/ethernet/sfc/efx_channels.c       | 4 ++--
>  drivers/net/ethernet/sfc/falcon/efx.c         | 5 ++---
>  drivers/net/ethernet/sfc/siena/efx_channels.c | 4 ++--
>  3 files changed, 6 insertions(+), 7 deletions(-)
>

Reviewed-by: Joe Damato <joe@...a.to>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ