Commit 94cd832
io_uring: use size_add helpers for ring offsets
Use size_add / size_mul set of functions for rings_size() calculations.
It's more consistent with struct_size(), and errors are preserved across
a series of calculations, so intermediate result checks can be omitted.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent e279bb4 commit 94cd832
1 file changed
Lines changed: 8 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2765 | 2765 | | |
2766 | 2766 | | |
2767 | 2767 | | |
2768 | | - | |
2769 | | - | |
2770 | | - | |
2771 | | - | |
2772 | | - | |
2773 | | - | |
2774 | | - | |
2775 | 2768 | | |
2776 | 2769 | | |
2777 | 2770 | | |
| |||
2781 | 2774 | | |
2782 | 2775 | | |
2783 | 2776 | | |
| 2777 | + | |
| 2778 | + | |
| 2779 | + | |
| 2780 | + | |
| 2781 | + | |
| 2782 | + | |
2784 | 2783 | | |
2785 | 2784 | | |
2786 | 2785 | | |
| |||
2793 | 2792 | | |
2794 | 2793 | | |
2795 | 2794 | | |
2796 | | - | |
2797 | | - | |
2798 | | - | |
| 2795 | + | |
| 2796 | + | |
2799 | 2797 | | |
2800 | 2798 | | |
2801 | 2799 | | |
| |||
0 commit comments