Re: [PATCH net] ipvs: Fix clamp() order in ip_vs_conn_init()
From: Dan Carpenter
Date: Wed Dec 11 2024 - 10:51:41 EST
On Wed, Dec 11, 2024 at 02:27:06PM +0000, David Laight wrote:
> From: Dan Carpenter
> > Sent: 11 December 2024 13:17
> >
> > We recently added some build time asserts to detect incorrect calls to
> > clamp and it detected this bug which breaks the build. The variable
> > in this clamp is "max_avail" and it should be the first argument. The
> > code currently is the equivalent to max = max(max_avail, max).
>
> The fix is correct but the description above is wrong.
Aw yes, it's max = min(max_avail, max); I'll resend.
regards,
dan carpenter