Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Feb 2017 21:05:36 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r313744 - head/sys/cam/ctl
Message-ID:  <201702142105.v1EL5aEU047727@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Tue Feb 14 21:05:36 2017
New Revision: 313744
URL: https://svnweb.freebsd.org/changeset/base/313744

Log:
  No need to erase sense_data when sense_len is set to zero.
  
  MFC after:	2 weeks

Modified:
  head/sys/cam/ctl/ctl_error.c

Modified: head/sys/cam/ctl/ctl_error.c
==============================================================================
--- head/sys/cam/ctl/ctl_error.c	Tue Feb 14 21:02:27 2017	(r313743)
+++ head/sys/cam/ctl/ctl_error.c	Tue Feb 14 21:05:36 2017	(r313744)
@@ -920,10 +920,7 @@ ctl_set_data_phase_error(struct ctl_scsi
 void
 ctl_set_reservation_conflict(struct ctl_scsiio *ctsio)
 {
-	struct scsi_sense_data *sense;
 
-	sense = &ctsio->sense_data;
-	memset(sense, 0, sizeof(*sense));
 	ctsio->scsi_status = SCSI_STATUS_RESERV_CONFLICT;
 	ctsio->sense_len = 0;
 	ctsio->io_hdr.status = CTL_SCSI_ERROR;
@@ -932,10 +929,7 @@ ctl_set_reservation_conflict(struct ctl_
 void
 ctl_set_queue_full(struct ctl_scsiio *ctsio)
 {
-	struct scsi_sense_data *sense;
 
-	sense = &ctsio->sense_data;
-	memset(sense, 0, sizeof(*sense));
 	ctsio->scsi_status = SCSI_STATUS_QUEUE_FULL;
 	ctsio->sense_len = 0;
 	ctsio->io_hdr.status = CTL_SCSI_ERROR;
@@ -944,10 +938,7 @@ ctl_set_queue_full(struct ctl_scsiio *ct
 void
 ctl_set_busy(struct ctl_scsiio *ctsio)
 {
-	struct scsi_sense_data *sense;
 
-	sense = &ctsio->sense_data;
-	memset(sense, 0, sizeof(*sense));
 	ctsio->scsi_status = SCSI_STATUS_BUSY;
 	ctsio->sense_len = 0;
 	ctsio->io_hdr.status = CTL_SCSI_ERROR;
@@ -956,10 +947,7 @@ ctl_set_busy(struct ctl_scsiio *ctsio)
 void
 ctl_set_task_aborted(struct ctl_scsiio *ctsio)
 {
-	struct scsi_sense_data *sense;
 
-	sense = &ctsio->sense_data;
-	memset(sense, 0, sizeof(*sense));
 	ctsio->scsi_status = SCSI_STATUS_TASK_ABORTED;
 	ctsio->sense_len = 0;
 	ctsio->io_hdr.status = CTL_CMD_ABORTED;
@@ -992,10 +980,7 @@ ctl_set_space_alloc_fail(struct ctl_scsi
 void
 ctl_set_success(struct ctl_scsiio *ctsio)
 {
-	struct scsi_sense_data *sense;
 
-	sense = &ctsio->sense_data;
-	memset(sense, 0, sizeof(*sense));
 	ctsio->scsi_status = SCSI_STATUS_OK;
 	ctsio->sense_len = 0;
 	ctsio->io_hdr.status = CTL_SUCCESS;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702142105.v1EL5aEU047727>