aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2021-11-29 16:44:12 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2021-11-29 16:45:15 +0000
commitfbf5246757630650c23ed711c527a67dd52eb745 (patch)
treeec2d392810c5da7985c2f71fc2dd0fa213f3d04b
parent1cde21402ab7c2527dec1050f37b14ae077eafe7 (diff)
downloadsrc-fbf5246757630650c23ed711c527a67dd52eb745.tar.gz
src-fbf5246757630650c23ed711c527a67dd52eb745.zip
cfiscsi(4): Fix "set but not used" warning
No functional changes. Sponsored By: EPSRC
-rw-r--r--sys/cam/ctl/ctl_frontend_iscsi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/cam/ctl/ctl_frontend_iscsi.c b/sys/cam/ctl/ctl_frontend_iscsi.c
index b8ab25e89eb9..6b002566b465 100644
--- a/sys/cam/ctl/ctl_frontend_iscsi.c
+++ b/sys/cam/ctl/ctl_frontend_iscsi.c
@@ -2857,12 +2857,11 @@ cfiscsi_scsi_command_done(union ctl_io *io)
struct iscsi_bhs_scsi_response *bhssr;
#ifdef DIAGNOSTIC
struct cfiscsi_data_wait *cdw;
-#endif
struct cfiscsi_session *cs;
+#endif
uint16_t sense_length;
request = PRIV_REQUEST(io);
- cs = PDU_SESSION(request);
bhssc = (struct iscsi_bhs_scsi_command *)request->ip_bhs;
KASSERT((bhssc->bhssc_opcode & ~ISCSI_BHS_OPCODE_IMMEDIATE) ==
ISCSI_BHS_OPCODE_SCSI_COMMAND,
@@ -2872,6 +2871,7 @@ cfiscsi_scsi_command_done(union ctl_io *io)
// bhssc->bhssc_initiator_task_tag);
#ifdef DIAGNOSTIC
+ cs = PDU_SESSION(request);
CFISCSI_SESSION_LOCK(cs);
TAILQ_FOREACH(cdw, &cs->cs_waiting_for_data_out, cdw_next)
KASSERT(bhssc->bhssc_initiator_task_tag !=