Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Dec 2017 00:29:51 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r326606 - in head/sys/cam: . ata mmc nvme scsi
Message-ID:  <201712060029.vB60TpKm094973@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Wed Dec  6 00:29:50 2017
New Revision: 326606
URL: https://svnweb.freebsd.org/changeset/base/326606

Log:
  Remove unused 4th argument to match the standard error routines.
  
  Sponsored by: Netflix
  Differential Revision: https://reviews.freebsd.org/D13386

Modified:
  head/sys/cam/ata/ata_da.c
  head/sys/cam/ata/ata_pmp.c
  head/sys/cam/ata/ata_xpt.c
  head/sys/cam/cam_periph.c
  head/sys/cam/cam_periph.h
  head/sys/cam/mmc/mmc_da.c
  head/sys/cam/nvme/nvme_da.c
  head/sys/cam/scsi/scsi_cd.c
  head/sys/cam/scsi/scsi_ch.c
  head/sys/cam/scsi/scsi_da.c
  head/sys/cam/scsi/scsi_enc.c
  head/sys/cam/scsi/scsi_pass.c
  head/sys/cam/scsi/scsi_pt.c
  head/sys/cam/scsi/scsi_sa.c
  head/sys/cam/scsi/scsi_sg.c
  head/sys/cam/scsi/scsi_xpt.c

Modified: head/sys/cam/ata/ata_da.c
==============================================================================
--- head/sys/cam/ata/ata_da.c	Wed Dec  6 00:29:43 2017	(r326605)
+++ head/sys/cam/ata/ata_da.c	Wed Dec  6 00:29:50 2017	(r326606)
@@ -3354,7 +3354,7 @@ adaerror(union ccb *ccb, u_int32_t cam_flags, u_int32_
 	}
 #endif
 
-	return(cam_periph_error(ccb, cam_flags, sense_flags, NULL));
+	return(cam_periph_error(ccb, cam_flags, sense_flags));
 }
 
 static void

Modified: head/sys/cam/ata/ata_pmp.c
==============================================================================
--- head/sys/cam/ata/ata_pmp.c	Wed Dec  6 00:29:43 2017	(r326605)
+++ head/sys/cam/ata/ata_pmp.c	Wed Dec  6 00:29:50 2017	(r326606)
@@ -597,7 +597,7 @@ pmpdone(struct cam_periph *periph, union ccb *done_ccb
 	priority = done_ccb->ccb_h.pinfo.priority;
 
 	if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
-		if (cam_periph_error(done_ccb, 0, 0, NULL) == ERESTART) {
+		if (cam_periph_error(done_ccb, 0, 0) == ERESTART) {
 			return;
 		} else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
 			cam_release_devq(done_ccb->ccb_h.path,

Modified: head/sys/cam/ata/ata_xpt.c
==============================================================================
--- head/sys/cam/ata/ata_xpt.c	Wed Dec  6 00:29:43 2017	(r326605)
+++ head/sys/cam/ata/ata_xpt.c	Wed Dec  6 00:29:50 2017	(r326606)
@@ -763,8 +763,8 @@ probedone(struct cam_periph *periph, union ccb *done_c
 
 	if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
 		if (cam_periph_error(done_ccb,
-		    0, softc->restart ? (SF_NO_RECOVERY | SF_NO_RETRY) : 0,
-		    NULL) == ERESTART) {
+			0, softc->restart ? (SF_NO_RECOVERY | SF_NO_RETRY) : 0
+		    ) == ERESTART) {
 out:
 			/* Drop freeze taken due to CAM_DEV_QFREEZE flag set. */
 			cam_release_devq(path, 0, 0, 0, FALSE);

Modified: head/sys/cam/cam_periph.c
==============================================================================
--- head/sys/cam/cam_periph.c	Wed Dec  6 00:29:43 2017	(r326605)
+++ head/sys/cam/cam_periph.c	Wed Dec  6 00:29:50 2017	(r326606)
@@ -1302,7 +1302,7 @@ camperiphdone(struct cam_periph *periph, union ccb *do
 			}
 		}
 		if (cam_periph_error(done_ccb,
-		    0, SF_RETRY_UA | SF_NO_PRINT, NULL) == ERESTART)
+		    0, SF_RETRY_UA | SF_NO_PRINT) == ERESTART)
 			goto out;
 		if (done_ccb->ccb_h.status & CAM_DEV_QFRZN) {
 			cam_release_devq(done_ccb->ccb_h.path, 0, 0, 0, 0);
@@ -1716,7 +1716,7 @@ sense_error_done:
  */
 int
 cam_periph_error(union ccb *ccb, cam_flags camflags,
-		 u_int32_t sense_flags, union ccb *save_ccb)
+		 u_int32_t sense_flags)
 {
 	struct cam_path *newpath;
 	union ccb  *orig_ccb, *scan_ccb;

Modified: head/sys/cam/cam_periph.h
==============================================================================
--- head/sys/cam/cam_periph.h	Wed Dec  6 00:29:43 2017	(r326605)
+++ head/sys/cam/cam_periph.h	Wed Dec  6 00:29:50 2017	(r326606)
@@ -197,7 +197,7 @@ void		cam_periph_freeze_after_event(struct cam_periph 
 					      struct timeval* event_time,
 					      u_int duration_ms);
 int		cam_periph_error(union ccb *ccb, cam_flags camflags,
-				 u_int32_t sense_flags, union ccb *save_ccb);
+				 u_int32_t sense_flags);
 
 static __inline struct mtx *
 cam_periph_mtx(struct cam_periph *periph)

Modified: head/sys/cam/mmc/mmc_da.c
==============================================================================
--- head/sys/cam/mmc/mmc_da.c	Wed Dec  6 00:29:43 2017	(r326605)
+++ head/sys/cam/mmc/mmc_da.c	Wed Dec  6 00:29:50 2017	(r326606)
@@ -1425,6 +1425,6 @@ sddadone(struct cam_periph *periph, union ccb *done_cc
 static int
 sddaerror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags)
 {
-	return(cam_periph_error(ccb, cam_flags, sense_flags, NULL));
+	return(cam_periph_error(ccb, cam_flags, sense_flags));
 }
 #endif /* _KERNEL */

Modified: head/sys/cam/nvme/nvme_da.c
==============================================================================
--- head/sys/cam/nvme/nvme_da.c	Wed Dec  6 00:29:43 2017	(r326605)
+++ head/sys/cam/nvme/nvme_da.c	Wed Dec  6 00:29:50 2017	(r326606)
@@ -407,7 +407,7 @@ ndadump(void *arg, void *virtual, vm_offset_t physical
 		xpt_polled_action((union ccb *)&nvmeio);
 
 		error = cam_periph_error((union ccb *)&nvmeio,
-		    0, SF_NO_RECOVERY | SF_NO_RETRY, NULL);
+		    0, SF_NO_RECOVERY | SF_NO_RETRY);
 		if ((nvmeio.ccb_h.status & CAM_DEV_QFRZN) != 0)
 			cam_release_devq(nvmeio.ccb_h.path, /*relsim_flags*/0,
 			    /*reduction*/0, /*timeout*/0, /*getcount_only*/0);
@@ -426,7 +426,7 @@ ndadump(void *arg, void *virtual, vm_offset_t physical
 	xpt_polled_action((union ccb *)&nvmeio);
 
 	error = cam_periph_error((union ccb *)&nvmeio,
-	    0, SF_NO_RECOVERY | SF_NO_RETRY, NULL);
+	    0, SF_NO_RECOVERY | SF_NO_RETRY);
 	if ((nvmeio.ccb_h.status & CAM_DEV_QFRZN) != 0)
 		cam_release_devq(nvmeio.ccb_h.path, /*relsim_flags*/0,
 		    /*reduction*/0, /*timeout*/0, /*getcount_only*/0);
@@ -1087,7 +1087,7 @@ ndaerror(union ccb *ccb, u_int32_t cam_flags, u_int32_
 		break;
 	}
 
-	return(cam_periph_error(ccb, cam_flags, sense_flags, NULL));
+	return(cam_periph_error(ccb, cam_flags, sense_flags));
 }
 
 /*

Modified: head/sys/cam/scsi/scsi_cd.c
==============================================================================
--- head/sys/cam/scsi/scsi_cd.c	Wed Dec  6 00:29:43 2017	(r326605)
+++ head/sys/cam/scsi/scsi_cd.c	Wed Dec  6 00:29:50 2017	(r326606)
@@ -2593,8 +2593,7 @@ cderror(union ccb *ccb, u_int32_t cam_flags, u_int32_t
 
 	if (softc->quirks & CD_Q_RETRY_BUSY)
 		sense_flags |= SF_RETRY_BUSY;
-	return (cam_periph_error(ccb, cam_flags, sense_flags, 
-				 &softc->saved_ccb));
+	return (cam_periph_error(ccb, cam_flags, sense_flags));
 }
 
 static void

Modified: head/sys/cam/scsi/scsi_ch.c
==============================================================================
--- head/sys/cam/scsi/scsi_ch.c	Wed Dec  6 00:29:43 2017	(r326605)
+++ head/sys/cam/scsi/scsi_ch.c	Wed Dec  6 00:29:50 2017	(r326606)
@@ -752,8 +752,7 @@ cherror(union ccb *ccb, u_int32_t cam_flags, u_int32_t
 	periph = xpt_path_periph(ccb->ccb_h.path);
 	softc = (struct ch_softc *)periph->softc;
 
-	return (cam_periph_error(ccb, cam_flags, sense_flags,
-				 &softc->saved_ccb));
+	return (cam_periph_error(ccb, cam_flags, sense_flags));
 }
 
 static int

Modified: head/sys/cam/scsi/scsi_da.c
==============================================================================
--- head/sys/cam/scsi/scsi_da.c	Wed Dec  6 00:29:43 2017	(r326605)
+++ head/sys/cam/scsi/scsi_da.c	Wed Dec  6 00:29:50 2017	(r326606)
@@ -1676,7 +1676,7 @@ dadump(void *arg, void *virtual, vm_offset_t physical,
 		xpt_polled_action((union ccb *)&csio);
 
 		error = cam_periph_error((union ccb *)&csio,
-		    0, SF_NO_RECOVERY | SF_NO_RETRY, NULL);
+		    0, SF_NO_RECOVERY | SF_NO_RETRY);
 		if ((csio.ccb_h.status & CAM_DEV_QFRZN) != 0)
 			cam_release_devq(csio.ccb_h.path, /*relsim_flags*/0,
 			    /*reduction*/0, /*timeout*/0, /*getcount_only*/0);
@@ -1704,7 +1704,7 @@ dadump(void *arg, void *virtual, vm_offset_t physical,
 		xpt_polled_action((union ccb *)&csio);
 
 		error = cam_periph_error((union ccb *)&csio,
-		    0, SF_NO_RECOVERY | SF_NO_RETRY | SF_QUIET_IR, NULL);
+		    0, SF_NO_RECOVERY | SF_NO_RETRY | SF_QUIET_IR);
 		if ((csio.ccb_h.status & CAM_DEV_QFRZN) != 0)
 			cam_release_devq(csio.ccb_h.path, /*relsim_flags*/0,
 			    /*reduction*/0, /*timeout*/0, /*getcount_only*/0);
@@ -5450,8 +5450,7 @@ daerror(union ccb *ccb, u_int32_t cam_flags, u_int32_t
 
 	if (softc->quirks & DA_Q_RETRY_BUSY)
 		sense_flags |= SF_RETRY_BUSY;
-	return(cam_periph_error(ccb, cam_flags, sense_flags,
-				&softc->saved_ccb));
+	return(cam_periph_error(ccb, cam_flags, sense_flags));
 }
 
 static void

Modified: head/sys/cam/scsi/scsi_enc.c
==============================================================================
--- head/sys/cam/scsi/scsi_enc.c	Wed Dec  6 00:29:43 2017	(r326605)
+++ head/sys/cam/scsi/scsi_enc.c	Wed Dec  6 00:29:50 2017	(r326606)
@@ -335,7 +335,7 @@ enc_error(union ccb *ccb, uint32_t cflags, uint32_t sf
 	periph = xpt_path_periph(ccb->ccb_h.path);
 	softc = (struct enc_softc *)periph->softc;
 
-	return (cam_periph_error(ccb, cflags, sflags, &softc->saved_ccb));
+	return (cam_periph_error(ccb, cflags, sflags));
 }
 
 static int

Modified: head/sys/cam/scsi/scsi_pass.c
==============================================================================
--- head/sys/cam/scsi/scsi_pass.c	Wed Dec  6 00:29:43 2017	(r326605)
+++ head/sys/cam/scsi/scsi_pass.c	Wed Dec  6 00:29:50 2017	(r326606)
@@ -2277,6 +2277,5 @@ passerror(union ccb *ccb, u_int32_t cam_flags, u_int32
 	periph = xpt_path_periph(ccb->ccb_h.path);
 	softc = (struct pass_softc *)periph->softc;
 	
-	return(cam_periph_error(ccb, cam_flags, sense_flags, 
-				 &softc->saved_ccb));
+	return(cam_periph_error(ccb, cam_flags, sense_flags));
 }

Modified: head/sys/cam/scsi/scsi_pt.c
==============================================================================
--- head/sys/cam/scsi/scsi_pt.c	Wed Dec  6 00:29:43 2017	(r326605)
+++ head/sys/cam/scsi/scsi_pt.c	Wed Dec  6 00:29:50 2017	(r326606)
@@ -571,8 +571,7 @@ pterror(union ccb *ccb, u_int32_t cam_flags, u_int32_t
 	periph = xpt_path_periph(ccb->ccb_h.path);
 	softc = (struct pt_softc *)periph->softc;
 
-	return(cam_periph_error(ccb, cam_flags, sense_flags,
-				&softc->saved_ccb));
+	return(cam_periph_error(ccb, cam_flags, sense_flags));
 }
 
 static int

Modified: head/sys/cam/scsi/scsi_sa.c
==============================================================================
--- head/sys/cam/scsi/scsi_sa.c	Wed Dec  6 00:29:43 2017	(r326605)
+++ head/sys/cam/scsi/scsi_sa.c	Wed Dec  6 00:29:50 2017	(r326606)
@@ -3469,7 +3469,7 @@ saerror(union ccb *ccb, u_int32_t cflgs, u_int32_t sfl
 		/*
 		 * Otherwise, we let the common code handle this.
 		 */
-		return (cam_periph_error(ccb, cflgs, sflgs, &softc->saved_ccb));
+		return (cam_periph_error(ccb, cflgs, sflgs));
 
 	/*
 	 * XXX: To Be Fixed
@@ -3482,7 +3482,7 @@ saerror(union ccb *ccb, u_int32_t cflgs, u_int32_t sfl
 		}
 		/* FALLTHROUGH */
 	default:
-		return (cam_periph_error(ccb, cflgs, sflgs, &softc->saved_ccb));
+		return (cam_periph_error(ccb, cflgs, sflgs));
 	}
 
 	/*

Modified: head/sys/cam/scsi/scsi_sg.c
==============================================================================
--- head/sys/cam/scsi/scsi_sg.c	Wed Dec  6 00:29:43 2017	(r326605)
+++ head/sys/cam/scsi/scsi_sg.c	Wed Dec  6 00:29:50 2017	(r326606)
@@ -943,8 +943,7 @@ sgerror(union ccb *ccb, uint32_t cam_flags, uint32_t s
 	periph = xpt_path_periph(ccb->ccb_h.path);
 	softc = (struct sg_softc *)periph->softc;
 
-	return (cam_periph_error(ccb, cam_flags, sense_flags,
-				 &softc->saved_ccb));
+	return (cam_periph_error(ccb, cam_flags, sense_flags));
 }
 
 static void

Modified: head/sys/cam/scsi/scsi_xpt.c
==============================================================================
--- head/sys/cam/scsi/scsi_xpt.c	Wed Dec  6 00:29:43 2017	(r326605)
+++ head/sys/cam/scsi/scsi_xpt.c	Wed Dec  6 00:29:50 2017	(r326606)
@@ -1180,8 +1180,8 @@ probedone(struct cam_periph *periph, union ccb *done_c
 	{
 		if (cam_ccb_status(done_ccb) != CAM_REQ_CMP) {
 
-			if (cam_periph_error(done_ccb, 0,
-					     SF_NO_PRINT, NULL) == ERESTART) {
+			if (cam_periph_error(done_ccb, 0, SF_NO_PRINT) ==
+			    ERESTART) {
 outr:
 				/* Drop freeze taken due to CAM_DEV_QFREEZE */
 				cam_release_devq(path, 0, 0, 0, FALSE);
@@ -1278,8 +1278,7 @@ out:
 		} else if (cam_periph_error(done_ccb, 0,
 					    done_ccb->ccb_h.target_lun > 0
 					    ? SF_RETRY_UA|SF_QUIET_IR
-					    : SF_RETRY_UA,
-					    &softc->saved_ccb) == ERESTART) {
+					    : SF_RETRY_UA) == ERESTART) {
 			goto outr;
 		} else {
 			if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
@@ -1321,9 +1320,9 @@ out:
 
 		if (cam_ccb_status(done_ccb) != CAM_REQ_CMP) {
 			if (cam_periph_error(done_ccb, 0,
-			    done_ccb->ccb_h.target_lun > 0 ?
-			    SF_RETRY_UA|SF_QUIET_IR : SF_RETRY_UA,
-			    &softc->saved_ccb) == ERESTART) {
+				done_ccb->ccb_h.target_lun > 0 ?
+				SF_RETRY_UA|SF_QUIET_IR : SF_RETRY_UA) ==
+			    ERESTART) {
 				goto outr;
 			}
 			if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
@@ -1427,8 +1426,7 @@ out:
 			page = (struct scsi_control_page *)offset;
 			path->device->queue_flags = page->queue_flags;
 		} else if (cam_periph_error(done_ccb, 0,
-					    SF_RETRY_UA|SF_NO_PRINT,
-					    &softc->saved_ccb) == ERESTART) {
+			SF_RETRY_UA|SF_NO_PRINT) == ERESTART) {
 			goto outr;
 		} else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
 			/* Don't wedge the queue */
@@ -1470,8 +1468,7 @@ out:
 			xpt_schedule(periph, priority);
 			goto out;
 		} else if (cam_periph_error(done_ccb, 0,
-					    SF_RETRY_UA|SF_NO_PRINT,
-					    &softc->saved_ccb) == ERESTART) {
+			SF_RETRY_UA|SF_NO_PRINT) == ERESTART) {
 			goto outr;
 		} else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
 			/* Don't wedge the queue */
@@ -1515,8 +1512,7 @@ out:
 				path->device->device_id = (uint8_t *)devid;
 			}
 		} else if (cam_periph_error(done_ccb, 0,
-					    SF_RETRY_UA,
-					    &softc->saved_ccb) == ERESTART) {
+			SF_RETRY_UA) == ERESTART) {
 			goto outr;
 		} else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
 			/* Don't wedge the queue */
@@ -1558,9 +1554,8 @@ out:
 				path->device->ext_inq_len = length;
 				path->device->ext_inq = (uint8_t *)ext_inq;
 			}
-		} else if (cam_periph_error(done_ccb, 0,
-					    SF_RETRY_UA,
-					    &softc->saved_ccb) == ERESTART) {
+		} else if (cam_periph_error(done_ccb, 0, SF_RETRY_UA) ==
+		    ERESTART) {
 			goto outr;
 		} else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
 			/* Don't wedge the queue */
@@ -1623,8 +1618,7 @@ probe_device_check:
 				path->device->serial_num[slen] = '\0';
 			}
 		} else if (cam_periph_error(done_ccb, 0,
-					    SF_RETRY_UA|SF_NO_PRINT,
-					    &softc->saved_ccb) == ERESTART) {
+			SF_RETRY_UA|SF_NO_PRINT) == ERESTART) {
 			goto outr;
 		} else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
 			/* Don't wedge the queue */
@@ -1693,7 +1687,7 @@ probe_device_check:
 	case PROBE_DV_EXIT:
 		if (cam_ccb_status(done_ccb) != CAM_REQ_CMP) {
 			cam_periph_error(done_ccb, 0,
-			    SF_NO_PRINT | SF_NO_RECOVERY | SF_NO_RETRY, NULL);
+			    SF_NO_PRINT | SF_NO_RECOVERY | SF_NO_RETRY);
 		}
 		if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
 			/* Don't wedge the queue */
@@ -1744,7 +1738,7 @@ probe_device_check:
 
 		if (cam_ccb_status(done_ccb) != CAM_REQ_CMP) {
 			cam_periph_error(done_ccb, 0,
-			    SF_NO_PRINT | SF_NO_RECOVERY | SF_NO_RETRY, NULL);
+			    SF_NO_PRINT | SF_NO_RECOVERY | SF_NO_RETRY);
 		}
 		if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) {
 			/* Don't wedge the queue */



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