Re: [PATCH for-next] RDMA/core: Fix best page size finding when it can cross SG entries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux