From owner-svn-src-projects@FreeBSD.ORG Mon Sep 2 13:24:08 2013 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 21335B68; Mon, 2 Sep 2013 13:24:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0EAC32079; Mon, 2 Sep 2013 13:24:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r82DO78L065308; Mon, 2 Sep 2013 13:24:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r82DO7Hm065307; Mon, 2 Sep 2013 13:24:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201309021324.r82DO7Hm065307@svn.freebsd.org> From: Alexander Motin Date: Mon, 2 Sep 2013 13:24:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r255147 - projects/camlock/sys/cam X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2013 13:24:08 -0000 Author: mav Date: Mon Sep 2 13:24:07 2013 New Revision: 255147 URL: http://svnweb.freebsd.org/changeset/base/255147 Log: Remove some unneeded pointer dereferences. Modified: projects/camlock/sys/cam/cam_xpt.c Modified: projects/camlock/sys/cam/cam_xpt.c ============================================================================== --- projects/camlock/sys/cam/cam_xpt.c Mon Sep 2 12:37:33 2013 (r255146) +++ projects/camlock/sys/cam/cam_xpt.c Mon Sep 2 13:24:07 2013 (r255147) @@ -3215,8 +3215,7 @@ xpt_run_devq(struct cam_devq *devq) * available. */ xpt_freeze_devq(work_ccb->ccb_h.path, 1); - STAILQ_INSERT_TAIL(&xsoftc.highpowerq, - work_ccb->ccb_h.path->device, + STAILQ_INSERT_TAIL(&xsoftc.highpowerq, device, highpowerq_entry); mtx_unlock(&xsoftc.xpt_lock); @@ -3279,12 +3278,11 @@ xpt_run_devq(struct cam_devq *devq) } /* - * Device queues can be shared among multiple sim instances - * that reside on different busses. Use the SIM in the queue - * CCB's path, rather than the one in the bus that was passed - * into this function. + * Device queues can be shared among multiple SIM instances + * that reside on different busses. Use the SIM from the + * queued device, rather than the one from the calling bus. */ - sim = work_ccb->ccb_h.path->bus->sim; + sim = device->sim; lock = (mtx_owned(sim->mtx) == 0); if (lock) CAM_SIM_LOCK(sim);