From owner-svn-src-all@freebsd.org Sun Jan 15 13:51:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C222CB11EC; Sun, 15 Jan 2017 13:51:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 3B3E6134D; Sun, 15 Jan 2017 13:51:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0FDpiMC080611; Sun, 15 Jan 2017 13:51:44 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0FDpiXV080609; Sun, 15 Jan 2017 13:51:44 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701151351.v0FDpiXV080609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 15 Jan 2017 13:51:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312231 - head/sys/cam/ctl X-SVN-Group: head 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.23 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: Sun, 15 Jan 2017 13:51:45 -0000 Author: mav Date: Sun Jan 15 13:51:44 2017 New Revision: 312231 URL: https://svnweb.freebsd.org/changeset/base/312231 Log: When in kernel, map ctl_scsi_zero_io() to ctl_zero_io(). MFC after: 1 week Modified: head/sys/cam/ctl/ctl_util.c head/sys/cam/ctl/ctl_util.h Modified: head/sys/cam/ctl/ctl_util.c ============================================================================== --- head/sys/cam/ctl/ctl_util.c Sun Jan 15 13:40:14 2017 (r312230) +++ head/sys/cam/ctl/ctl_util.c Sun Jan 15 13:51:44 2017 (r312231) @@ -697,7 +697,6 @@ ctl_scsi_free_io(union ctl_io *io) free(io); } -#endif /* !_KERNEL */ void ctl_scsi_zero_io(union ctl_io *io) { @@ -707,11 +706,10 @@ ctl_scsi_zero_io(union ctl_io *io) return; pool_ref = io->io_hdr.pool; - memset(io, 0, sizeof(*io)); - io->io_hdr.pool = pool_ref; } +#endif /* !_KERNEL */ const char * ctl_scsi_task_string(struct ctl_taskio *taskio) Modified: head/sys/cam/ctl/ctl_util.h ============================================================================== --- head/sys/cam/ctl/ctl_util.h Sun Jan 15 13:40:14 2017 (r312230) +++ head/sys/cam/ctl/ctl_util.h Sun Jan 15 13:51:44 2017 (r312231) @@ -96,8 +96,10 @@ void ctl_scsi_maintenance_in(union ctl_i #ifndef _KERNEL union ctl_io *ctl_scsi_alloc_io(uint32_t initid); void ctl_scsi_free_io(union ctl_io *io); -#endif /* !_KERNEL */ void ctl_scsi_zero_io(union ctl_io *io); +#else +#define ctl_scsi_zero_io(io) ctl_zero_io(io) +#endif /* !_KERNEL */ const char *ctl_scsi_task_string(struct ctl_taskio *taskio); void ctl_io_sbuf(union ctl_io *io, struct sbuf *sb); void ctl_io_error_sbuf(union ctl_io *io,