On Wed, Oct 20, 2021 at 01:08:17PM -0600, Jens Axboe wrote: > The second argument is only used by the USB gadget code, yet everyone > pays the overhead of passing a zero to be passed into aio, where it > ends up being part of the aio res2 value. > > Since we pass this value around as long, there's only 32-bits of > information in each of these. Linux IO transfers are capped at INT_MAX > anyway, so could not be any larger return value. For the one cases where > we care about this second result, mask it into the upper bits of the > value passed in. aio can then simply shift to get it. > > For everyone else, just pass in res as an argument like before. Update > all ki_complete handlers to conform to the new prototype. > > On 64-bit, this avoids an extra register allocation and clear for the > the fast path (non-USB gadget...). > > Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> Acked-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>