Skip to contentSkip to conversation

scsi: scsi_debug: remove dead code

PATCH Applied Maurizio Lombardi 3 participants 4 messages Jun 28, 2023 – Jul 11, 2023 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: scsi_debug: remove dead code

The ramdisk rwlocks are not used anymore

Fixes 87c715dcde63 ("scsi: scsi_debug: Add per_host_store option")
---
 drivers/scsi/scsi_debug.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/scsi/scsi_debug.c +0 -8
index 8c58128ad32a..9c0af50501f9 100644
@@ -841,11 +841,6 @@ static int sdeb_zbc_nr_conv = DEF_ZBC_NR_CONV_ZONES;
 static int submit_queues = DEF_SUBMIT_QUEUES;  /* > 1 for multi-queue (mq) */
 static int poll_queues; /* iouring iopoll interface.*/
 
-static DEFINE_RWLOCK(atomic_rw);
-static DEFINE_RWLOCK(atomic_rw2);
-
-static rwlock_t *ramdisk_lck_a[2];
-
 static char sdebug_proc_name[] = MY_NAME;
 static const char *my_name = MY_NAME;
 
@@ -6818,9 +6813,6 @@ static int __init scsi_debug_init(void)
 	int k, ret, hosts_to_add;
 	int idx = -1;
 
-	ramdisk_lck_a[0] = &atomic_rw;
-	ramdisk_lck_a[1] = &atomic_rw2;
-
 	if (sdebug_ndelay >= 1000 * 1000 * 1000) {
 		pr_warn("ndelay must be less than 1 second, ignored\n");
 		sdebug_ndelay = 0;
Signature · 1 line
2.39.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 29 lines · Maurizio Lombardi

The ramdisk rwlocks are not used anymore

Fixes 87c715dcde63 ("scsi: scsi_debug: Add per_host_store option")

---
 drivers/scsi/scsi_debug.c | 8 --------

 1 file changed, 8 deletions(-)
drivers/scsi/scsi_debug.c +0 -0
index 8c58128ad32a..9c0af50501f9 100644
@@ -841,11 +841,6 @@ static int sdeb_zbc_nr_conv =
 DEF_ZBC_NR_CONV_ZONES;

 static int submit_queues = DEF_SUBMIT_QUEUES;  /* > 1 for multi- queue (mq) */
 static int poll_queues; /* iouring iopoll interface.*/

drivers/scsi/scsi_debug.c +0 -5
-static DEFINE_RWLOCK(atomic_rw);
-static DEFINE_RWLOCK(atomic_rw2);
-
-static rwlock_t *ramdisk_lck_a[2];
-

 static char sdebug_proc_name[] = MY_NAME;
 static const char *my_name = MY_NAME;

drivers/scsi/scsi_debug.c +0 -0
@@ -6818,9 +6813,6 @@ static int __init scsi_debug_init(void)
         int k, ret, hosts_to_add;
         int idx = -1;
Quoted 8 lines


-       ramdisk_lck_a[0] = &atomic_rw;
-       ramdisk_lck_a[1] = &atomic_rw2;
-
        if (sdebug_ndelay >= 1000 * 1000 * 1000) { pr_warn("ndelay must be less than 1 second, ignored\n");
                sdebug_ndelay = 0;

Looks good to me:

linux]$ grep -e atomic_rw -e atomic_rw2 -e ramdisk_lck_a drivers/scsi/scsi_debug.c
static DEFINE_RWLOCK(atomic_rw);
static DEFINE_RWLOCK(atomic_rw2);

static rwlock_t *ramdisk_lck_a[2];
	ramdisk_lck_a[0] = &atomic_rw;
	ramdisk_lck_a[1] = &atomic_rw2;