From nobody Sat Dec 23 04:37:43 2023 X-Original-To: dev-commits-src-all@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 4Sxrxg6LGGz54xKR; Sat, 23 Dec 2023 04:37:43 +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 4Sxrxg4k2mz3Tl8; Sat, 23 Dec 2023 04:37:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703306263; 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=jvDsm3yFQNrZGk5ZJMOc/rvxqLsUVqbfMNgsi0IuQ6o=; b=WGfpqD2xswCSRrU0yX3QHOo5p8MDmI502/M1IMw8EzzrOcUZ9M3vDKWIwVH0C/SDcqgm4K oTVGhpsSOiIXUhRJuoaqN+oxwNs/0PogFtwGYzmRDqPEczpojZQeuRmxfMPlMWYmmibwVE 76pAtGif73k/dXAq74a1ThhUjjml9DkFmNQiwOK5ixuYvHAUNFd5kfcvBN8exShS7h76gI 8p94DP8+VmCwScbpFzzRsyznDBI+bzyJsOjN6Tl8jnY2bLQGQ1e+yqia+OgKxwDEUAV0ng 1i23y+fCPvP6kTRmjqun+gzX2ICoZy2zzBJ8hA2ZvKqLVCpChzKrYW0K9RV7AA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703306263; a=rsa-sha256; cv=none; b=fysj+Gu5avE2uHeURhzZs46PTLPLQ8wV9TGI+liw2yIXCGjz+ZGJFX07v++mV4/0Q+PokN xJWRHNS+WiK14e4nptRoDMGSlxhC1Q6Sd3Kq2jVMmOSRWZCaypjqwLP/x7NICYmo/NoW2F CSXDs+T3+TqW24hSiRTH+zbFhZ7KbBxc/6fCBlUkJSRDDe5jJRfZJLKGUUws6esRHpXAuq kMzzRIUJ4ucb+ABLzFTgYCxJrKPBogGsRz0hEu56zEaxuJCdNh6r7xrYrx2Mx428ZItion Hzq3jmPegffq9p1/DrCR4wobiBSpllYnScc11dZ8GTA1bh0UKoeN6TlTSdNAYw== 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=1703306263; 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=jvDsm3yFQNrZGk5ZJMOc/rvxqLsUVqbfMNgsi0IuQ6o=; b=bleNE4Blw4Lcpjc+sAEMxpB6nUE1HpEJlXeL6JWdP6Ym9s1nAgXDk06pNawEI8cdI1uApn aH2bqTN89hs8whXJY7h/d8ypq5HxpnzQozNJAf4/1UY54teBbI7Ps/+l6bGmRuOsvIP1el XtPq6wBERxVrPIxyR6Z/tswwFRIb375pn8MvQWiY+6VabgLRBDWk6Wchr5OYkKvbBxAKcr bnW18tGO0OE3lNy1l9DRyReSfKBXbkV1h5SqNUtZDCIuo5Gw4D4gTJIcJaupPg6DZWjNCr Lk/tL5OnI7VTaXNu7s044dOECocLCwKtwxB/DJKwVB4fNgkixatApGhGe4rppA== 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 4Sxrxg3nSZzm5b; Sat, 23 Dec 2023 04:37:43 +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 3BN4bhsa088496; Sat, 23 Dec 2023 04:37:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BN4bhLp088493; Sat, 23 Dec 2023 04:37:43 GMT (envelope-from git) Date: Sat, 23 Dec 2023 04:37:43 GMT Message-Id: <202312230437.3BN4bhLp088493@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 129c3aa4b231 - stable/14 - Use xpt_path_sbuf() in few drivers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 129c3aa4b2312e3e2d91e5688a4368fc3836db98 Auto-Submitted: auto-generated The branch stable/14 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=129c3aa4b2312e3e2d91e5688a4368fc3836db98 commit 129c3aa4b2312e3e2d91e5688a4368fc3836db98 Author: Alexander Motin AuthorDate: 2023-11-23 16:25:45 +0000 Commit: Alexander Motin CommitDate: 2023-12-23 04:36:56 +0000 Use xpt_path_sbuf() in few drivers xpt_path_string() is now a wrapper around xpt_path_sbuf(). Using it to than concatenate result to another sbuf makes no sense. Just call xpt_path_sbuf() directly. MFC after: 1 month (cherry picked from commit 8c4ee0b22c98fc1e208dd133f617bd329cd10728) --- sys/dev/mpr/mpr_sas.c | 5 +---- sys/dev/mps/mps_sas.c | 5 +---- sys/dev/virtio/scsi/virtio_scsi.c | 4 +--- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/sys/dev/mpr/mpr_sas.c b/sys/dev/mpr/mpr_sas.c index 9d83162723ae..048b3cb7a53d 100644 --- a/sys/dev/mpr/mpr_sas.c +++ b/sys/dev/mpr/mpr_sas.c @@ -304,7 +304,6 @@ mprsas_log_command(struct mpr_command *cm, u_int level, const char *fmt, ...) struct sbuf sb; va_list ap; char str[224]; - char path_str[64]; if (cm == NULL) return; @@ -318,9 +317,7 @@ mprsas_log_command(struct mpr_command *cm, u_int level, const char *fmt, ...) va_start(ap, fmt); if (cm->cm_ccb != NULL) { - xpt_path_string(cm->cm_ccb->csio.ccb_h.path, path_str, - sizeof(path_str)); - sbuf_cat(&sb, path_str); + xpt_path_sbuf(cm->cm_ccb->csio.ccb_h.path, &sb); if (cm->cm_ccb->ccb_h.func_code == XPT_SCSI_IO) { scsi_command_string(&cm->cm_ccb->csio, &sb); sbuf_printf(&sb, "length %d ", diff --git a/sys/dev/mps/mps_sas.c b/sys/dev/mps/mps_sas.c index 6a5b2f5d90f3..3cf29aa4e893 100644 --- a/sys/dev/mps/mps_sas.c +++ b/sys/dev/mps/mps_sas.c @@ -295,7 +295,6 @@ mpssas_log_command(struct mps_command *cm, u_int level, const char *fmt, ...) struct sbuf sb; va_list ap; char str[224]; - char path_str[64]; if (cm == NULL) return; @@ -309,9 +308,7 @@ mpssas_log_command(struct mps_command *cm, u_int level, const char *fmt, ...) va_start(ap, fmt); if (cm->cm_ccb != NULL) { - xpt_path_string(cm->cm_ccb->csio.ccb_h.path, path_str, - sizeof(path_str)); - sbuf_cat(&sb, path_str); + xpt_path_sbuf(cm->cm_ccb->csio.ccb_h.path, &sb); if (cm->cm_ccb->ccb_h.func_code == XPT_SCSI_IO) { scsi_command_string(&cm->cm_ccb->csio, &sb); sbuf_printf(&sb, "length %d ", diff --git a/sys/dev/virtio/scsi/virtio_scsi.c b/sys/dev/virtio/scsi/virtio_scsi.c index 0355962c7af9..163def248065 100644 --- a/sys/dev/virtio/scsi/virtio_scsi.c +++ b/sys/dev/virtio/scsi/virtio_scsi.c @@ -2336,7 +2336,6 @@ vtscsi_printf_req(struct vtscsi_request *req, const char *func, struct sbuf sb; va_list ap; char str[192]; - char path_str[64]; if (req == NULL) return; @@ -2352,8 +2351,7 @@ vtscsi_printf_req(struct vtscsi_request *req, const char *func, cam_sim_name(sc->vtscsi_sim), cam_sim_unit(sc->vtscsi_sim), cam_sim_bus(sc->vtscsi_sim)); } else { - xpt_path_string(ccb->ccb_h.path, path_str, sizeof(path_str)); - sbuf_cat(&sb, path_str); + xpt_path_sbuf(ccb->ccb_h.path, &sb); if (ccb->ccb_h.func_code == XPT_SCSI_IO) { scsi_command_string(&ccb->csio, &sb); sbuf_printf(&sb, "length %d ", ccb->csio.dxfer_len);