Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Feb 2017 06:32:01 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r314380 - stable/10/sys/cam/ctl
Message-ID:  <201702280632.v1S6W1Oc092389@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Tue Feb 28 06:32:01 2017
New Revision: 314380
URL: https://svnweb.freebsd.org/changeset/base/314380

Log:
  MFC r313744: No need to erase sense_data when sense_len is set to zero.

Modified:
  stable/10/sys/cam/ctl/ctl_error.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cam/ctl/ctl_error.c
==============================================================================
--- stable/10/sys/cam/ctl/ctl_error.c	Tue Feb 28 06:31:34 2017	(r314379)
+++ stable/10/sys/cam/ctl/ctl_error.c	Tue Feb 28 06:32:01 2017	(r314380)
@@ -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?201702280632.v1S6W1Oc092389>