From nobody@FreeBSD.org  Fri Jul 13 18:07:05 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 5336D1065670
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 13 Jul 2012 18:07:05 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 3EC4A8FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 13 Jul 2012 18:07:05 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q6DI74Jo053073
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 13 Jul 2012 18:07:04 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q6DI74ED053072;
	Fri, 13 Jul 2012 18:07:04 GMT
	(envelope-from nobody)
Message-Id: <201207131807.q6DI74ED053072@red.freebsd.org>
Date: Fri, 13 Jul 2012 18:07:04 GMT
From: Steven Hartland <steven.hartland@multiplay.co.uk>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Path to remove some unused variables from scsi_da probe setup
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         169835
>Category:       kern
>Synopsis:       [patch] remove some unused variables from scsi_da probe setup
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    smh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 13 18:10:02 UTC 2012
>Closed-Date:    Fri Jun 07 15:00:16 UTC 2013
>Last-Modified:  Fri Jun 07 15:00:16 UTC 2013
>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@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:
Responsible-Changed-From-To: freebsd-bugs->freebsd-scsi 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Jul 13 19:43:41 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=169835 
Responsible-Changed-From-To: freebsd-scsi->smh 
Responsible-Changed-By: smh 
Responsible-Changed-When: Thu Dec 13 22:21:45 UTC 2012 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=169835 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/169835: commit references a PR
Date: Thu, 10 Jan 2013 11:28:25 +0000 (UTC)

 Author: smh
 Date: Thu Jan 10 11:28:12 2013
 New Revision: 245251
 URL: http://svnweb.freebsd.org/changeset/base/245251
 
 Log:
   Removes essentially unused variables from scsi_da probe setups
   
   PR:		kern/169835
   Reviewed by:	pjd (mentor)
   Approved by:	mav
   MFC after:	2 weeks
 
 Modified:
   head/sys/cam/scsi/scsi_da.c
 
 Modified: head/sys/cam/scsi/scsi_da.c
 ==============================================================================
 --- head/sys/cam/scsi/scsi_da.c	Thu Jan 10 11:08:22 2013	(r245250)
 +++ head/sys/cam/scsi/scsi_da.c	Thu Jan 10 11:28:12 2013	(r245251)
 @@ -2014,7 +2014,6 @@ out:
  	}
  	case DA_STATE_PROBE:
  	{
 -		struct ccb_scsiio *csio;
  		struct scsi_read_capacity_data *rcap;
  
  		rcap = (struct scsi_read_capacity_data *)
 @@ -2024,8 +2023,7 @@ out:
  			/* 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,
 @@ -2039,7 +2037,6 @@ out:
  	}
  	case DA_STATE_PROBE2:
  	{
 -		struct ccb_scsiio *csio;
  		struct scsi_read_capacity_data_long *rcaplong;
  
  		rcaplong = (struct scsi_read_capacity_data_long *)
 @@ -2049,8 +2046,7 @@ out:
  			/* 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,
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->patched 
State-Changed-By: smh 
State-Changed-When: Thu Jan 10 14:40:52 UTC 2013 
State-Changed-Why:  
Awaiting MFC 

http://www.freebsd.org/cgi/query-pr.cgi?pr=169835 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/169835: commit references a PR
Date: Fri,  5 Apr 2013 11:46:05 +0000 (UTC)

 Author: mav
 Date: Fri Apr  5 11:45:52 2013
 New Revision: 249154
 URL: http://svnweb.freebsd.org/changeset/base/249154
 
 Log:
   MFC r245251 (by smh):
   Removes essentially unused variables from scsi_da probe setups
   
   PR:		kern/169835
 
 Modified:
   stable/9/sys/cam/scsi/scsi_da.c
 Directory Properties:
   stable/9/sys/   (props changed)
 
 Modified: stable/9/sys/cam/scsi/scsi_da.c
 ==============================================================================
 --- stable/9/sys/cam/scsi/scsi_da.c	Fri Apr  5 11:42:28 2013	(r249153)
 +++ stable/9/sys/cam/scsi/scsi_da.c	Fri Apr  5 11:45:52 2013	(r249154)
 @@ -2014,7 +2014,6 @@ out:
  	}
  	case DA_STATE_PROBE:
  	{
 -		struct ccb_scsiio *csio;
  		struct scsi_read_capacity_data *rcap;
  
  		rcap = (struct scsi_read_capacity_data *)
 @@ -2024,8 +2023,7 @@ out:
  			/* 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,
 @@ -2039,7 +2037,6 @@ out:
  	}
  	case DA_STATE_PROBE2:
  	{
 -		struct ccb_scsiio *csio;
  		struct scsi_read_capacity_data_long *rcaplong;
  
  		rcaplong = (struct scsi_read_capacity_data_long *)
 @@ -2049,8 +2046,7 @@ out:
  			/* 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,
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: smh 
State-Changed-When: Fri Jun 7 15:00:15 UTC 2013 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=169835 
>Unformatted:
