On Mon, Aug 26, 2024 at 10:50:03AM +0800, Hongbo Li wrote: > > > On 2024/8/24 20:06, David Howells wrote: > > Hongbo Li <lihongbo22@xxxxxxxxxx> wrote: > > > > > - summary.ack_reason = (sp->ack.reason < RXRPC_ACK__INVALID ? > > > - sp->ack.reason : RXRPC_ACK__INVALID); > > > + summary.ack_reason = min(sp->ack.reason, RXRPC_ACK__INVALID); > > > > Can you use umin() rather than min(), please? > > > > I see reason is u8, so may I use min_t(u8, sp->ack.reason, > RXRPC_ACK__INVALID)? I believe that umin was added precisely to avoid such constructions. See: 80fcac55385c ("minmax: add umin(a, b) and umax(a, b)") https://git.kernel.org/torvalds/c/80fcac55385c