Re: [PATCH] thunderbolt: Use min() for the DMA path credit cap
From: Mika Westerberg
Date: Mon Aug 10 2026 - 07:34:42 EST
Hi,
On Mon, Aug 10, 2026 at 09:38:43AM +0000, Fan Ye via B4 Relay wrote:
> From: Fan Ye <fy15309206903@xxxxxxxxx>
>
> tb_dma_reserve_credits() caps the request against what the adapter has
> left by decrementing one credit at a time. The other arm of the same
> if() already caps with min(port->total_credits, credits); use min()
> here too.
>
> No functional change: the object code is unchanged.
>
> Assisted-by: Claude:claude-opus-5
> Signed-off-by: Fan Ye <fy15309206903@xxxxxxxxx>
Applied to thunderbolt.git/next, thanks!