summaryrefslogtreecommitdiff
path: root/include/linux/i2c/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorMehdi Ben Hadj Khelifa <mehdi.benhadjkhelifa@gmail.com>2025-10-18 22:38:13 +0100
committerJens Axboe <axboe@kernel.dk>2025-10-20 10:38:56 -0600
commite5a82249d88c7063c4ac998704b0ae5784013976 (patch)
tree9def6fae838892ca45f63f628e49cad81097083c /include/linux/i2c/git@git.tavy.me:linux.git
parentd60055cf52703a705b86fb25b9b7931ec7ee399c (diff)
blk-mq: use struct_size() in kmalloc()
Change struct size calculation to use struct_size() to align with new recommended practices[1] which quotes: "Another common case to avoid is calculating the size of a structure with a trailing array of others structures, as in: header = kzalloc(sizeof(*header) + count * sizeof(*header->item), GFP_KERNEL); Instead, use the helper: header = kzalloc(struct_size(header, item, count), GFP_KERNEL);" Signed-off-by: Mehdi Ben Hadj Khelifa <mehdi.benhadjkhelifa@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/i2c/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions