From owner-svn-src-stable-8@FreeBSD.ORG Fri Jun 10 10:09:49 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F20E106566B; Fri, 10 Jun 2011 10:09:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E90998FC08; Fri, 10 Jun 2011 10:09:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5AA9mLO021196; Fri, 10 Jun 2011 10:09:48 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5AA9mS2021192; Fri, 10 Jun 2011 10:09:48 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201106101009.p5AA9mS2021192@svn.freebsd.org> From: Alexander Motin Date: Fri, 10 Jun 2011 10:09:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222926 - in stable/8/sys/cam: . ata X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2011 10:09:49 -0000 Author: mav Date: Fri Jun 10 10:09:48 2011 New Revision: 222926 URL: http://svn.freebsd.org/changeset/base/222926 Log: MFC r220778, r220785: Remove some unused variables. Found with: Clang Static Analyzer Modified: stable/8/sys/cam/ata/ata_da.c stable/8/sys/cam/ata/ata_pmp.c stable/8/sys/cam/cam_xpt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/cam/ata/ata_da.c ============================================================================== --- stable/8/sys/cam/ata/ata_da.c Fri Jun 10 09:58:48 2011 (r222925) +++ stable/8/sys/cam/ata/ata_da.c Fri Jun 10 10:09:48 2011 (r222926) @@ -264,7 +264,6 @@ adaopen(struct disk *dp) { struct cam_periph *periph; struct ada_softc *softc; - int unit; int error; periph = (struct cam_periph *)dp->d_drv1; @@ -283,13 +282,12 @@ adaopen(struct disk *dp) return (error); } - unit = periph->unit_number; softc = (struct ada_softc *)periph->softc; softc->flags |= ADA_FLAG_OPEN; CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("adaopen: disk=%s%d (unit %d)\n", dp->d_name, dp->d_unit, - unit)); + periph->unit_number)); if ((softc->flags & ADA_FLAG_PACK_INVALID) != 0) { /* Invalidate our pack information. */ @@ -1293,11 +1291,6 @@ adadone(struct cam_periph *periph, union static int adaerror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags) { - struct ada_softc *softc; - struct cam_periph *periph; - - periph = xpt_path_periph(ccb->ccb_h.path); - softc = (struct ada_softc *)periph->softc; return(cam_periph_error(ccb, cam_flags, sense_flags, NULL)); } Modified: stable/8/sys/cam/ata/ata_pmp.c ============================================================================== --- stable/8/sys/cam/ata/ata_pmp.c Fri Jun 10 09:58:48 2011 (r222925) +++ stable/8/sys/cam/ata/ata_pmp.c Fri Jun 10 10:09:48 2011 (r222926) @@ -215,12 +215,9 @@ pmprelease(struct cam_periph *periph, in static void pmponinvalidate(struct cam_periph *periph) { - struct pmp_softc *softc; struct cam_path *dpath; int i; - softc = (struct pmp_softc *)periph->softc; - /* * De-register any async callbacks. */ @@ -548,7 +545,7 @@ pmpdone(struct cam_periph *periph, union struct ccb_trans_settings cts; struct pmp_softc *softc; struct ccb_ataio *ataio; - struct cam_path *path, *dpath; + struct cam_path *dpath; u_int32_t priority, res; int i; @@ -557,7 +554,6 @@ pmpdone(struct cam_periph *periph, union CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("pmpdone\n")); - path = done_ccb->ccb_h.path; priority = done_ccb->ccb_h.pinfo.priority; if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { @@ -583,10 +579,10 @@ pmpdone(struct cam_periph *periph, union switch (softc->state) { case PMP_STATE_PORTS: - softc->pm_ports = (done_ccb->ataio.res.lba_high << 24) + - (done_ccb->ataio.res.lba_mid << 16) + - (done_ccb->ataio.res.lba_low << 8) + - done_ccb->ataio.res.sector_count; + softc->pm_ports = (ataio->res.lba_high << 24) + + (ataio->res.lba_mid << 16) + + (ataio->res.lba_low << 8) + + ataio->res.sector_count; /* This PMP declares 6 ports, while only 5 of them are real. * Port 5 is enclosure management bridge port, which has implementation * problems, causing probe faults. Hide it for now. */ @@ -650,10 +646,10 @@ pmpdone(struct cam_periph *periph, union xpt_schedule(periph, priority); return; case PMP_STATE_CHECK: - res = (done_ccb->ataio.res.lba_high << 24) + - (done_ccb->ataio.res.lba_mid << 16) + - (done_ccb->ataio.res.lba_low << 8) + - done_ccb->ataio.res.sector_count; + res = (ataio->res.lba_high << 24) + + (ataio->res.lba_mid << 16) + + (ataio->res.lba_low << 8) + + ataio->res.sector_count; if (((res & 0xf0f) == 0x103 && (res & 0x0f0) != 0) || (res & 0x600) != 0) { if (bootverbose) { Modified: stable/8/sys/cam/cam_xpt.c ============================================================================== --- stable/8/sys/cam/cam_xpt.c Fri Jun 10 09:58:48 2011 (r222925) +++ stable/8/sys/cam/cam_xpt.c Fri Jun 10 10:09:48 2011 (r222926) @@ -2489,12 +2489,8 @@ xpt_action_default(union ccb *start_ccb) start_ccb->ccb_h.status = CAM_DEV_NOT_THERE; } else { struct ccb_getdev *cgd; - struct cam_eb *bus; - struct cam_et *tar; cgd = &start_ccb->cgd; - bus = cgd->ccb_h.path->bus; - tar = cgd->ccb_h.path->target; cgd->protocol = dev->protocol; cgd->inq_data = dev->inq_data; cgd->ident_data = dev->ident_data;