From owner-svn-src-all@FreeBSD.ORG Thu Dec 18 08:31:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 651687D4; Thu, 18 Dec 2014 08:31:14 +0000 (UTC) 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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3729F18BF; Thu, 18 Dec 2014 08:31:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBI8VEAv024593; Thu, 18 Dec 2014 08:31:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBI8VE7Y024592; Thu, 18 Dec 2014 08:31:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201412180831.sBI8VE7Y024592@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 18 Dec 2014 08:31:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r275887 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Dec 2014 08:31:14 -0000 Author: mav Date: Thu Dec 18 08:31:13 2014 New Revision: 275887 URL: https://svnweb.freebsd.org/changeset/base/275887 Log: MFC r275455: Remove some unused code. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Thu Dec 18 08:30:28 2014 (r275886) +++ stable/10/sys/cam/ctl/ctl.c Thu Dec 18 08:31:13 2014 (r275887) @@ -402,12 +402,6 @@ static int ctl_ioctl(struct cdev *dev, u struct thread *td); static uint32_t ctl_map_lun(int port_num, uint32_t lun); static uint32_t ctl_map_lun_back(int port_num, uint32_t lun); -#ifdef unused -static union ctl_io *ctl_malloc_io(ctl_io_type io_type, uint32_t targ_port, - uint32_t targ_target, uint32_t targ_lun, - int can_wait); -static void ctl_kfree_io(union ctl_io *io); -#endif /* unused */ static int ctl_alloc_lun(struct ctl_softc *ctl_softc, struct ctl_lun *lun, struct ctl_be_lun *be_lun, struct ctl_id target_id); static int ctl_free_lun(struct ctl_lun *lun); @@ -3701,43 +3695,6 @@ ctl_set_prkey(struct ctl_lun *lun, uint3 t[residx % CTL_MAX_INIT_PER_PORT] = key; } -#ifdef unused -/* - * The bus, target and lun are optional, they can be filled in later. - * can_wait is used to determine whether we can wait on the malloc or not. - */ -union ctl_io* -ctl_malloc_io(ctl_io_type io_type, uint32_t targ_port, uint32_t targ_target, - uint32_t targ_lun, int can_wait) -{ - union ctl_io *io; - - if (can_wait) - io = (union ctl_io *)malloc(sizeof(*io), M_CTL, M_WAITOK); - else - io = (union ctl_io *)malloc(sizeof(*io), M_CTL, M_NOWAIT); - - if (io != NULL) { - io->io_hdr.io_type = io_type; - io->io_hdr.targ_port = targ_port; - /* - * XXX KDM this needs to change/go away. We need to move - * to a preallocated pool of ctl_scsiio structures. - */ - io->io_hdr.nexus.targ_target.id = targ_target; - io->io_hdr.nexus.targ_lun = targ_lun; - } - - return (io); -} - -void -ctl_kfree_io(union ctl_io *io) -{ - free(io, M_CTL); -} -#endif /* unused */ - /* * ctl_softc, pool_name, total_ctl_io are passed in. * npool is passed out.