From nobody Sun Jun 09 14:12:01 2024 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 4VxxhK31fFz5MCSN; Sun, 09 Jun 2024 14:12:01 +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 4VxxhK28mYz4CYq; Sun, 9 Jun 2024 14:12:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717942321; 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=nG0Tt4cn4Fb+ddbPGETNQH1ewK69nysTN6H5keyE5Z0=; b=Lw8r9x5TbgSB7iPGGd8uuICbU7JOEAXn6pD9gxLfgOsa9B0ou42F+dv2HVK/d6+MM5Hj9g PLgRcGOSt37E0QeEDE0PjmycX3fpk2Wt1SYvehqg6qD+LRsMT7JGcILSU8sOVTsZUJYi66 /gY247SrLmCAhoTLoltck1YpbdkIazJ8cp3oCrRN9CLMqgTXu5+JimwOp/ha5zoidCRqqT sBHG4gOSOkt8tVwckJiPICsNq4QQ8A5b/ru3JjnP6EOo4PLBazlDrKrWP0Da6LCl0xR9Pg IK1ShR2QNWvkvKYhC8Bf/lqTi+qgROEyMFrDdxwGalFiZePLxNjQ2TZQscIUkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717942321; a=rsa-sha256; cv=none; b=UroYT5X+759g80VrWzoelgNMvMbryNcSAUXLCXGT1x+5kIatLVL2BSl9U4WeVdqN5hZalU A5m7CCbMTDJ6Ce9es5s2uiS+l0O99O0/40ry+CB5ttr10poorFk13OIUr1Q18KzOJeNL1J jWHxLugbPmmycB6wAjQ3sVY/OGqF0TtdbQ4PY1kMI4rG25O7FOn+dJTQgVAFe4nAe20eNx hxVsTkaU/bIZ7EeagJxERAct9qItDeIqyMsxAxswyBxKFnMPwOF02ug1Oq6p0G2TQ2Vt8N dTT3+wTQAVL4K+DMQJMQQipuaJzrpfQTUheOaEHV+20AmQOz04Nex1qhUxI78Q== 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=1717942321; 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=nG0Tt4cn4Fb+ddbPGETNQH1ewK69nysTN6H5keyE5Z0=; b=cYni+dLi3e65I92Nih4AfCUWNmHzt1/WIcaTlaAL0yS8V1Ye7Z0cFDQjoJdio6b+CIV/eF ea5/nenMpkgUHYQn280NqdgCc+T3Br0Ry5TcoR5cEfreS36fzqqohbE+Iba4CfS5QOADcG 9ptyEqo+uGqQKV5iQVjKEtaCiFixKI4gFnGCGuJAIsOErh9fwS0cBp/pjVGD21QTzdU/dk LC0CIF7aqMI9BO2KVfPmw+iCaDf/7S7flQ+kw1YSbYXv5Tb+U9Ltijfzy91cG8xJoXQIkY XybrAERBQd13ppKPDmvHoJ/XNfGETtZ4WdS5bbxMp+wz4YRpvsxsPZB/boku6A== 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 4VxxhK1mHzzlYs; Sun, 9 Jun 2024 14:12:01 +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 459EC1gh085482; Sun, 9 Jun 2024 14:12:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 459EC1vR085479; Sun, 9 Jun 2024 14:12:01 GMT (envelope-from git) Date: Sun, 9 Jun 2024 14:12:01 GMT Message-Id: <202406091412.459EC1vR085479@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 6324f0268918 - stable/14 - ahci: Use device_set_desc(f)() 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6324f02689182418abf19df36b077a9a7d9d13ee Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6324f02689182418abf19df36b077a9a7d9d13ee commit 6324f02689182418abf19df36b077a9a7d9d13ee Author: Mark Johnston AuthorDate: 2024-02-04 23:32:53 +0000 Commit: Mark Johnston CommitDate: 2024-06-09 13:37:47 +0000 ahci: Use device_set_desc(f)() No functional change intended. MFC after: 1 week (cherry picked from commit a74b496507329665c6aa8d0ef2ea42c2fbd88c48) --- sys/dev/ahci/ahci.c | 2 +- sys/dev/ahci/ahci_generic.c | 4 ++-- sys/dev/ahci/ahci_pci.c | 12 ++++-------- sys/dev/ahci/ahciem.c | 2 +- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c index 2f0971bddd9b..80cbdefd1e29 100644 --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -767,7 +767,7 @@ static int ahci_ch_probe(device_t dev) { - device_set_desc_copy(dev, "AHCI channel"); + device_set_desc(dev, "AHCI channel"); return (BUS_PROBE_DEFAULT); } diff --git a/sys/dev/ahci/ahci_generic.c b/sys/dev/ahci/ahci_generic.c index 90487b4622eb..2d4babb17645 100644 --- a/sys/dev/ahci/ahci_generic.c +++ b/sys/dev/ahci/ahci_generic.c @@ -76,7 +76,7 @@ ahci_fdt_probe(device_t dev) if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) return (ENXIO); - device_set_desc_copy(dev, "AHCI SATA controller"); + device_set_desc(dev, "AHCI SATA controller"); node = ofw_bus_get_node(dev); ctlr->dma_coherent = OF_hasprop(node, "dma-coherent"); return (BUS_PROBE_DEFAULT); @@ -107,7 +107,7 @@ ahci_acpi_probe(device_t dev) if (pci_get_class(dev) == PCIC_STORAGE && pci_get_subclass(dev) == PCIS_STORAGE_SATA && pci_get_progif(dev) == PCIP_STORAGE_SATA_AHCI_1_0) { - device_set_desc_copy(dev, "AHCI SATA controller"); + device_set_desc(dev, "AHCI SATA controller"); if (ACPI_FAILURE(acpi_GetInteger(h, "_CCA", &ctlr->dma_coherent))) ctlr->dma_coherent = 0; diff --git a/sys/dev/ahci/ahci_pci.c b/sys/dev/ahci/ahci_pci.c index 93a72875b502..3d4a7d7c7400 100644 --- a/sys/dev/ahci/ahci_pci.c +++ b/sys/dev/ahci/ahci_pci.c @@ -397,7 +397,6 @@ ahci_pci_ctlr_reset(device_t dev) static int ahci_probe(device_t dev) { - char buf[64]; int i, valid = 0; uint32_t devid = pci_get_devid(dev); uint8_t revid = pci_get_revid(dev); @@ -428,22 +427,20 @@ ahci_probe(device_t dev) (ahci_ids[i].quirks & AHCI_Q_NOFORCE) && (pci_read_config(dev, 0xdf, 1) & 0x40) == 0) return (ENXIO); - snprintf(buf, sizeof(buf), "%s AHCI SATA controller", + device_set_descf(dev, "%s AHCI SATA controller", ahci_ids[i].name); - device_set_desc_copy(dev, buf); return (BUS_PROBE_DEFAULT); } } if (valid != 1) return (ENXIO); - device_set_desc_copy(dev, "AHCI SATA controller"); + device_set_desc(dev, "AHCI SATA controller"); return (BUS_PROBE_DEFAULT); } static int ahci_ata_probe(device_t dev) { - char buf[64]; int i; uint32_t devid = pci_get_devid(dev); uint8_t revid = pci_get_revid(dev); @@ -454,13 +451,12 @@ ahci_ata_probe(device_t dev) for (i = 0; ahci_ids[i].id != 0; i++) { if (ahci_ids[i].id == devid && ahci_ids[i].rev <= revid) { - snprintf(buf, sizeof(buf), "%s AHCI SATA controller", + device_set_descf(dev, "%s AHCI SATA controller", ahci_ids[i].name); - device_set_desc_copy(dev, buf); return (BUS_PROBE_DEFAULT); } } - device_set_desc_copy(dev, "AHCI SATA controller"); + device_set_desc(dev, "AHCI SATA controller"); return (BUS_PROBE_DEFAULT); } diff --git a/sys/dev/ahci/ahciem.c b/sys/dev/ahci/ahciem.c index eb1f2bdc3924..d9ec64b2d014 100644 --- a/sys/dev/ahci/ahciem.c +++ b/sys/dev/ahci/ahciem.c @@ -64,7 +64,7 @@ static int ahci_em_probe(device_t dev) { - device_set_desc_copy(dev, "AHCI enclosure management bridge"); + device_set_desc(dev, "AHCI enclosure management bridge"); return (BUS_PROBE_DEFAULT); }