diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2022-08-18 22:59:57 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-09-22 03:45:04 +0200 |
commit | e55e1b4831563e5766f88fa821f5bfac0d6c298c (patch) | |
tree | df9ce7528a4f57a4b1af69423e62de114fafa8e6 /drivers/block/ps3vram.c | |
parent | block/drbd: remove useless comments in receive_DataReply() (diff) | |
download | linux-e55e1b4831563e5766f88fa821f5bfac0d6c298c.tar.xz linux-e55e1b4831563e5766f88fa821f5bfac0d6c298c.zip |
block: move from strlcpy with unused retval to strscpy
Follow the advice of the below link and prefer 'strscpy' in this
subsystem. Conversion is 1:1 because the return value is not used.
Generated by a coccinelle script.
Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com>
Acked-by: Geoff Levand <geoff@infradead.org>
Link: https://lore.kernel.org/r/20220818205958.6552-1-wsa+renesas@sang-engineering.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/ps3vram.c')
-rw-r--r-- | drivers/block/ps3vram.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c index e1d080f680ed..c76e0148eada 100644 --- a/drivers/block/ps3vram.c +++ b/drivers/block/ps3vram.c @@ -745,7 +745,7 @@ static int ps3vram_probe(struct ps3_system_bus_device *dev) gendisk->flags |= GENHD_FL_NO_PART; gendisk->fops = &ps3vram_fops; gendisk->private_data = dev; - strlcpy(gendisk->disk_name, DEVICE_NAME, sizeof(gendisk->disk_name)); + strscpy(gendisk->disk_name, DEVICE_NAME, sizeof(gendisk->disk_name)); set_capacity(gendisk, priv->size >> 9); blk_queue_max_segments(gendisk->queue, BLK_MAX_SEGMENTS); blk_queue_max_segment_size(gendisk->queue, BLK_MAX_SEGMENT_SIZE); |