libata: simplify ata_scsi_rbuf_fill()
authorDamien Le Moal <damien.lemoal@wdc.com>
Mon, 16 Aug 2021 01:44:48 +0000 (10:44 +0900)
committerJens Axboe <axboe@kernel.dk>
Wed, 18 Aug 2021 13:19:39 +0000 (07:19 -0600)
commit56b4f06c55add95fe508a1746d9173bade6388bf
tree5cdf7f2a32e9b1cc33972c68479cc60360af6c7b
parent355a8031dc174450ccad2a61c513ad7222d87a97
libata: simplify ata_scsi_rbuf_fill()

Sparse complains about context imbalance in ata_scsi_rbuf_get() and
ata_scsi_rbuf_put() due to these functions respectively only taking
and releasing the ata_scsi_rbuf_lock spinlock. Since these functions are
only called from ata_scsi_rbuf_fill() with ata_scsi_rbuf_get() being
called with a copy_in argument always false, the code can be simplified
and ata_scsi_rbuf_{get|put} removed. This change both simplifies the
code and fixes the sparse warning.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Link: https://lore.kernel.org/r/20210816014456.2191776-4-damien.lemoal@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/ata/libata-scsi.c