On 2/13/2025 4:42 PM, Jason Gunthorpe wrote:
I wonder if we should try to make a overflow.h helper for these kinds of problems. /* Check if a + n == b, failing if a+n overflows */ check_consecutive(a, n, b) ? It is a fairly common problem I suggest to take the patch as it originally was and try to propose the above helper?
Sounds reasonable, I can propose such check helpers. Michael