]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: scsi_debug: Silence unexpected unlock warnings
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>
Tue, 1 Mar 2022 11:30:08 +0000 (20:30 +0900)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 9 Mar 2022 03:30:34 +0000 (22:30 -0500)
commitebbc5a491506cf76ce1e746c6eea66fd95159193
treecbe92a777ba1a423f965aa05780daa492e14d5af
parent53d0b8b60e491be543bae322245347332027d123
scsi: scsi_debug: Silence unexpected unlock warnings

The return statement inside the sdeb_read_lock(), sdeb_read_unlock(),
sdeb_write_lock() and sdeb_write_unlock() confuse sparse, leading to many
warnings about unexpected unlocks in the resp_xxx() functions.

Modify the lock/unlock functions using the __acquire() and __release()
inline annotations for the sdebug_no_rwlock == true case to avoid these
warnings.

Link: https://lore.kernel.org/r/20220301113009.595857-2-damien.lemoal@opensource.wdc.com
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_debug.c