Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Dec 2014 10:39:47 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r275455 - head/sys/cam/ctl
Message-ID:  <201412031039.sB3Adlxm018646@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Wed Dec  3 10:39:47 2014
New Revision: 275455
URL: https://svnweb.freebsd.org/changeset/base/275455

Log:
  Remove some unused code.

Modified:
  head/sys/cam/ctl/ctl.c

Modified: head/sys/cam/ctl/ctl.c
==============================================================================
--- head/sys/cam/ctl/ctl.c	Wed Dec  3 10:03:34 2014	(r275454)
+++ head/sys/cam/ctl/ctl.c	Wed Dec  3 10:39:47 2014	(r275455)
@@ -400,12 +400,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);
@@ -3699,43 +3693,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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412031039.sB3Adlxm018646>