]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tcp: Use clamp() in htcp_alpha_update()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 4 Aug 2024 06:20:17 +0000 (08:20 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 6 Aug 2024 19:16:25 +0000 (12:16 -0700)
commit871cdea0f82ebcfa1d86ef527b054a20a6dff8a2
tree0517664cbb04990e3900a9087e7aef51a9b8a880
parent63a796b4988c3dca83176a534890b510d44f105a
tcp: Use clamp() in htcp_alpha_update()

Using clamp instead of min(max()) is easier to read and it matches even
better the comment just above it.

It also reduces the size of the preprocessed files by ~ 2.5 ko.
(see [1] for a discussion about it)

$ ls -l net/ipv4/tcp_htcp*.i
 5576024 27 juil. 10:19 net/ipv4/tcp_htcp.old.i
 5573550 27 juil. 10:21 net/ipv4/tcp_htcp.new.i

[1]: https://lore.kernel.org/all/23bdb6fc8d884ceebeb6e8b8653b8cfe@AcuMS.aculab.com/

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/561bb4974499a328ac39aff31858465d9bd12b1c.1722752370.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/tcp_htcp.c