mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
scsi: scsi_debug: Remove unused variable sdebug_any_injecting_opt
The static variable sdebug_any_injecting_opt is no longer read. Commit
3a90a63d02 ("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>
This commit is contained in:
parent
0f51fd8468
commit
f199cee401
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user