mirror of
https://github.com/torvalds/linux.git
synced 2026-11-25 07:52:34 +00:00
Switching to struct_size for the allocation in fifo_alloc avoids hard-coding the type of fifo_buffer.values in fifo_alloc. It also provides overflow protection; to avoid pessimistic code being generated by the compiler as a result, this patch also switches fifo_size to unsigned, propagating the change as appropriate. Reviewed-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Stephen Kitt <[email protected]> Signed-off-by: Jens Axboe <[email protected]>