misc/169835: Path to remove some unused variables from scsi_da probe setup

Steven Hartland steven.hartland at multiplay.co.uk
Fri Jul 13 18:10:11 UTC 2012


>Number:         169835
>Category:       misc
>Synopsis:       Path to remove some unused variables from scsi_da probe setup
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 13 18:10:02 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Steven Hartland
>Release:        8.3-RELEASE
>Organization:
Multiplay
>Environment:
FreeBSD build 8.3-RELEASE-p3 FreeBSD 8.3-RELEASE-p3 #3: Tue Jul  3 13:16:31 UTC 2012     root at build:/usr/obj/usr/src/sys/MULTIPLAY  amd64
>Description:
There's a few essentially unused variables in the scsi_da setup of the probe ccb's.
>How-To-Repeat:
N/A/
>Fix:
The attached patch removes these variables.

Patch attached with submission follows:

Removes essentially unused variables from scsi_da probe setups
--- sys/cam/scsi/scsi_da.c.orig	2012-07-13 17:57:03.142585191 +0000
+++ sys/cam/scsi/scsi_da.c	2012-07-13 17:57:58.379971224 +0000
@@ -1821,7 +1821,6 @@
 	}
 	case DA_STATE_PROBE:
 	{
-		struct ccb_scsiio *csio;
 		struct scsi_read_capacity_data *rcap;
 
 		rcap = (struct scsi_read_capacity_data *)
@@ -1831,8 +1830,7 @@
 			/* da_free_periph??? */
 			break;
 		}
-		csio = &start_ccb->csio;
-		scsi_read_capacity(csio,
+		scsi_read_capacity(&start_ccb->csio,
 				   /*retries*/4,
 				   dadone,
 				   MSG_SIMPLE_Q_TAG,
@@ -1846,7 +1844,6 @@
 	}
 	case DA_STATE_PROBE2:
 	{
-		struct ccb_scsiio *csio;
 		struct scsi_read_capacity_data_long *rcaplong;
 
 		rcaplong = (struct scsi_read_capacity_data_long *)
@@ -1856,8 +1853,7 @@
 			/* da_free_periph??? */
 			break;
 		}
-		csio = &start_ccb->csio;
-		scsi_read_capacity_16(csio,
+		scsi_read_capacity_16(&start_ccb->csio,
 				      /*retries*/ 4,
 				      /*cbfcnp*/ dadone,
 				      /*tag_action*/ MSG_SIMPLE_Q_TAG,


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list