From nobody Mon Oct 16 22:48:05 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S8XM93rTCz4xtn8; Mon, 16 Oct 2023 22:48:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S8XM91wyqz4YDm; Mon, 16 Oct 2023 22:48:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697496485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kM4dPmyTpfoDnVEq+HG8uqabUeoTbT2YneCWTpin1Q8=; b=yzIgi+rv9qU8lXjL2I3PU1N6JRKUJzb438hVedO5VHmTEfYqlaFeOcMzoLmSoPZVi0UsHq 5FznswMpRBwOkRkA3ch5YOdYv+T/YymoXBIHgu8P6mjaceHjbop4JOyXtVFr7tlStVg38d BWgii+DMQ3laBNz96XTAp0cOa9aerMlGOKqsi0U70aCQ0pzss2epDT1du2vHb4W6VVvkcp ouPIwW4UqEE8fUDJ9Tpa4qFhUZtihFvD5MAKaEcsSSXF5V+vOiwqK9VeOu+PW42DxeBRon KwtwZYF1rxmDxBcgu83XIK1iNqAp8fFlH4AYE2ekZcvdhMouHnJnjFNLI1KJOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697496485; a=rsa-sha256; cv=none; b=LutcKVD253aSJA3or7NWP1ZQep+01CcLTgEsGy7bBe8hqQZSuWQbpbR1lCYehmUezeFj+d 5NbwHy3MZz+EUe7M2pAQzn4ryNwpoS77bRnVpu2Q0IVVci7cPqVERnvgu2D4fz6GxqcqD/ z6FICsjmuCTjoqwqtkqf35WPMgEahINnB5KFXetUa9Mej5TI90sMaeD8tdJNnTvpSg2YBY ttQe/vFZuZiXJ0BdLJh/p6wLPdPWTn2VzaICq3FLhJ4RNv94bFWgCtEMrdtf9aacOZk1Nj /TOAPoA3VMV473YOhMoCUfi1NS8O7U0ZdeGlGHop2nJKpOLFdNpohHWwB5qUUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697496485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kM4dPmyTpfoDnVEq+HG8uqabUeoTbT2YneCWTpin1Q8=; b=hsFkiiGufvzFOxjHUS46g6vft2AGJ0G+tiBzRck6qNm2sLhalKhyplF2n6DUeMYPSoEGlY cu//oCvGeyRc6AssOG4VKTQnhPz0Zf1EtmEUsqg/tk3XZZe113UQiN1EHFvlrWLye9eXSy ruARPZ85/ceOikSxA2Znc1m1pCbT/w+Iwc2W+5lJMs9fiTb6v5LVX07qkC2epsUf751Xst Q2XYnCGzh+VZ9pmqXDfWaUsbsRMhnLJ3TnGaGQY6DTLsmrlJ0oHCdQX+HGO4iy/h9iygNh zl1UtRQ6BPS43sllK8hn6ED8IM5VzMQFDlrLxrTl5Ru65UkZ2WUKuKA5qQC4zA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S8XM911xFzydl; Mon, 16 Oct 2023 22:48:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39GMm56h012819; Mon, 16 Oct 2023 22:48:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39GMm5Vq012816; Mon, 16 Oct 2023 22:48:05 GMT (envelope-from git) Date: Mon, 16 Oct 2023 22:48:05 GMT Message-Id: <202310162248.39GMm5Vq012816@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: e846a3e0168f - main - ctl: Use ctl_io_sbuf in ctl_process_done List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e846a3e0168f9188a6eccedd52707c63fd83cba2 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e846a3e0168f9188a6eccedd52707c63fd83cba2 commit e846a3e0168f9188a6eccedd52707c63fd83cba2 Author: John Baldwin AuthorDate: 2023-10-16 22:47:09 +0000 Commit: John Baldwin CommitDate: 2023-10-16 22:47:09 +0000 ctl: Use ctl_io_sbuf in ctl_process_done This reduces a second copy of (mostly) the same code. Reviewed by: ken, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D42210 --- sys/cam/ctl/ctl.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index 6faecb0da0a4..a315c5ef7df3 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -13035,25 +13035,7 @@ ctl_process_done(union ctl_io *io) ctl_scsi_path_string(io, path_str, sizeof(path_str)); sbuf_new(&sb, str, sizeof(str), SBUF_FIXEDLEN); - sbuf_cat(&sb, path_str); - switch (io->io_hdr.io_type) { - case CTL_IO_SCSI: - ctl_scsi_command_string(&io->scsiio, NULL, &sb); - sbuf_printf(&sb, "\n"); - sbuf_cat(&sb, path_str); - sbuf_printf(&sb, "Tag: 0x%jx/%d, Prio: %d\n", - io->scsiio.tag_num, io->scsiio.tag_type, - io->scsiio.priority); - break; - case CTL_IO_TASK: - sbuf_printf(&sb, "Task Action: %d Tag: 0x%jx/%d\n", - io->taskio.task_action, - io->taskio.tag_num, io->taskio.tag_type); - break; - default: - panic("%s: Invalid CTL I/O type %d\n", - __func__, io->io_hdr.io_type); - } + ctl_io_sbuf(io, &sb); sbuf_cat(&sb, path_str); sbuf_printf(&sb, "ctl_process_done: %jd seconds\n", (intmax_t)time_uptime - io->io_hdr.start_time);