diff options
| author | Bart Van Assche <bvanassche@acm.org> | 2026-05-20 20:14:53 +0300 |
|---|---|---|
| committer | Martin K. Petersen <martin.petersen@oracle.com> | 2026-05-23 04:31:41 +0300 |
| commit | f199cee401f7dc7280c8ed070d2433478253b665 (patch) | |
| tree | 784ce8d3f508a24e59e8f8beacf6cb44a57a81a2 | |
| parent | 0f51fd84684316375d5c191a1ec5e18743fb1601 (diff) | |
| download | linux-f199cee401f7dc7280c8ed070d2433478253b665.tar.xz | |
scsi: scsi_debug: Remove unused variable sdebug_any_injecting_opt
The static variable sdebug_any_injecting_opt is no longer read. Commit
3a90a63d02b8 ("scsi: scsi_debug: every_nth triggered error injection")
removed all code that reads this variable. Hence, also remove this
variable itself. Remove SDEBUG_OPT_ALL_INJECTING because there is no
code left that uses this constant if sdebug_any_injecting_opt is
removed. This has been detected by building the scsi_debug driver with
the git HEAD version of Clang and with W=1.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Link: https://patch.msgid.link/20260520171454.4035623-1-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| -rw-r--r-- | drivers/scsi/scsi_debug.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 1515495fd9ea..a2f85ee1ae57 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -233,13 +233,6 @@ struct tape_block { #define SDEBUG_OPT_UNALIGNED_WRITE 0x20000 #define SDEBUG_OPT_ALL_NOISE (SDEBUG_OPT_NOISE | SDEBUG_OPT_Q_NOISE | \ SDEBUG_OPT_RESET_NOISE) -#define SDEBUG_OPT_ALL_INJECTING (SDEBUG_OPT_RECOVERED_ERR | \ - SDEBUG_OPT_TRANSPORT_ERR | \ - SDEBUG_OPT_DIF_ERR | SDEBUG_OPT_DIX_ERR | \ - SDEBUG_OPT_SHORT_TRANSFER | \ - SDEBUG_OPT_HOST_BUSY | \ - SDEBUG_OPT_CMD_ABORT | \ - SDEBUG_OPT_UNALIGNED_WRITE) #define SDEBUG_OPT_RECOV_DIF_DIX (SDEBUG_OPT_RECOVERED_ERR | \ SDEBUG_OPT_DIF_ERR | SDEBUG_OPT_DIX_ERR) @@ -955,7 +948,6 @@ static bool sdebug_removable = DEF_REMOVABLE; static bool sdebug_clustering; static bool sdebug_host_lock = DEF_HOST_LOCK; static bool sdebug_strict = DEF_STRICT; -static bool sdebug_any_injecting_opt; static bool sdebug_no_rwlock; static bool sdebug_verbose; static bool have_dif_prot; @@ -7528,7 +7520,6 @@ static int scsi_debug_write_info(struct Scsi_Host *host, char *buffer, return -EINVAL; sdebug_opts = opts; sdebug_verbose = !!(SDEBUG_OPT_NOISE & opts); - sdebug_any_injecting_opt = !!(SDEBUG_OPT_ALL_INJECTING & opts); if (sdebug_every_nth != 0) tweak_cmnd_count(); return length; @@ -7748,7 +7739,6 @@ static ssize_t opts_store(struct device_driver *ddp, const char *buf, opts_done: sdebug_opts = opts; sdebug_verbose = !!(SDEBUG_OPT_NOISE & opts); - sdebug_any_injecting_opt = !!(SDEBUG_OPT_ALL_INJECTING & opts); tweak_cmnd_count(); return count; } @@ -9659,7 +9649,6 @@ static int sdebug_driver_probe(struct device *dev) scsi_host_set_guard(hpnt, SHOST_DIX_GUARD_CRC); sdebug_verbose = !!(SDEBUG_OPT_NOISE & sdebug_opts); - sdebug_any_injecting_opt = !!(SDEBUG_OPT_ALL_INJECTING & sdebug_opts); if (sdebug_every_nth) /* need stats counters for every_nth */ sdebug_statistics = true; error = scsi_add_host(hpnt, &sdbg_host->dev); |
