]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: target: core: file: Don't duplicate memset(0xff)
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Sun, 28 Feb 2021 05:56:45 +0000 (21:56 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 10 Mar 2021 04:47:18 +0000 (23:47 -0500)
commit0200be177e42b619145d58a29dd1924c72cb305b
tree7efc03ffa60df069500467897a6ebc755d34d99f
parent8ce9e9f258da8c0764c569269d5044e260fe861e
scsi: target: core: file: Don't duplicate memset(0xff)

The function fd_do_prot_fill() is called from two callers
fd_do_prot_unmap() and fd_format_prot(). Both callers initialize the passed
buffer to 0xff with memset().

Move the memset() call to fd_do_prot_fill() to avoid duplication.

Link: https://lore.kernel.org/r/20210228055645.22253-24-chaitanya.kulkarni@wdc.com
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/target_core_file.c