aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/mutex.c
diff options
context:
space:
mode:
authorThorsten Blum <[email protected]>2025-04-10 15:47:23 +0000
committerJens Axboe <[email protected]>2025-04-11 13:10:46 +0000
commit3b607b75a345b1d808031bf1bb1038e4dac8d521 (patch)
tree67c946ca3bf5226fbbb34ae4c5e9278ddb4409ea /rust/helpers/mutex.c
parentMerge tag 'nvme-6.15-2025-04-10' of git://git.infradead.org/nvme into block-6.15 (diff)
downloadkernel-3b607b75a345b1d808031bf1bb1038e4dac8d521.tar.gz
kernel-3b607b75a345b1d808031bf1bb1038e4dac8d521.zip
null_blk: Use strscpy() instead of strscpy_pad() in null_add_dev()
blk_mq_alloc_disk() already zero-initializes the destination buffer, making strscpy() sufficient for safely copying the disk's name. The additional NUL-padding performed by strscpy_pad() is unnecessary. If the destination buffer has a fixed length, strscpy() automatically determines its size using sizeof() when the argument is omitted. This makes the explicit size argument unnecessary. The source string is also NUL-terminated and meets the __must_be_cstr() requirement of strscpy(). No functional changes intended. Signed-off-by: Thorsten Blum <[email protected]> Reviewed-by: Zhu Yanjun <[email protected]> Reviewed-by: Damien Le Moal <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'rust/helpers/mutex.c')
0 files changed, 0 insertions, 0 deletions