summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorDavid Laight <david.laight.linux@gmail.com>2026-02-03 21:41:22 +0300
committerJakub Kicinski <kuba@kernel.org>2026-02-05 05:45:09 +0300
commitb582090005d5c66bfdb73a85b91ddb42a868aff6 (patch)
treea6e6cc639ddff0195800d9b863576dd258ff36a1 /tools/testing
parentd7e712b66f9b3da11e7f523228409af6d56237cb (diff)
downloadlinux-b582090005d5c66bfdb73a85b91ddb42a868aff6.tar.xz
mptcp: Change some dubious min_t(int, ...) to min()
There are two: min_t(int, xxx, mptcp_wnd_end(msk) - msk->snd_nxt); Both mptcp_wnd_end(msk) and msk->snd_nxt are u64, their difference (aka the window size) might be limited to 32 bits - but that isn't knowable from this code. So checks being added to min_t() detect the potential discard of significant bits. Provided the 'avail_size' and return of mptcp_check_allowed_size() are changed to an unsigned type (size_t matches the type the caller uses) both min_t() can be changed to min(). Signed-off-by: David Laight <david.laight.linux@gmail.com> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> [ wrapped too long lines when declaring mptcp_check_allowed_size() ] Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20260203-net-next-mptcp-misc-feat-6-20-v1-6-31ec8bfc56d1@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing')
0 files changed, 0 insertions, 0 deletions