Re: [PATCH] null_blk: Use strscpy() instead of strscpy_pad() in null_add_dev()
From: Jens Axboe
Date: Fri Apr 11 2025 - 09:14:42 EST
On Thu, 10 Apr 2025 17:47:23 +0200, Thorsten Blum wrote:
> 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.
>
> [...]
Applied, thanks!
[1/1] null_blk: Use strscpy() instead of strscpy_pad() in null_add_dev()
commit: 3b607b75a345b1d808031bf1bb1038e4dac8d521
Best regards,
--
Jens Axboe