From nobody Sun Jun 02 23:47:12 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 4VstnD2F0Xz5LVVL; Sun, 02 Jun 2024 23:47:12 +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 4VstnD1gNzz49k6; Sun, 2 Jun 2024 23:47:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717372032; 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=EeM7BoAxOt7Jdtp/FEgR6pqV6OpJAoJ6MgxQ4ge5JQM=; b=Kk+rgBH7PtFJ51prgLUSjkeGE3Bb67ZABU97Bvuk3LP+KUkMHkSt5jUrgVvt/spQhfr2R1 G842/woT7WESGbL6luGyFama5FeabA/hYk49tRQwc0nBfNHj1OwfJVy/hVN2kajCoSy9P8 j2DmzAtu0yDanZs2Xqk/Omm8YS0Ew+duyuo9yhZr9bisKVTapBsjbPCVrio6F5GKINp5Zc sOesgVIu5eQ/Gk8aqZRupPPChAZPBKSWgvAs+2/Vwb2OjTUL+rH3xWea9TP/cK126WLOP+ 419gTFX+gjLrDuICyPRPcFaN1IqORtkzHsyKyxxyp32d7G1qEJ1tXYaGgrt2hw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717372032; a=rsa-sha256; cv=none; b=NZ+8AaKtnTOOI9fPDAPNhJ5jDFtt9aBD4IzHGKEoqzr6iR386ogL4S+VV1QWC4o5ffO3kD WO2uP616MlI0Qlz14C66m2m9O6+ws2bWWJ9VMbx0JpXkgsjH7TkKmb2leD6ERrn8e7K8je UXR4lO6VV5VO2wkvUgVWeEfbZv9ydJs+OF0Q9XzzWnzMfW8UFCxC7b8ViI0n/XS2TcM6se X4v7LISNJ8Bh9JCsepx54LCBB+6JntpzcErzs0x2CzBeEX5oPSIVAxOBRSJEwHC0eEWPt5 tFHpUOVkUyHfXQJjhf+KubAgIqlqZHod3SZKwUKX10/yAaoTjKZB1fbjugYl6Q== 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=1717372032; 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=EeM7BoAxOt7Jdtp/FEgR6pqV6OpJAoJ6MgxQ4ge5JQM=; b=S5bpZMhVVIsD7fQ7L9yTp51MNQS16XZ9tmEPv5balmOyiuj2mRTDaKZJX6fPXEmQpgSBSG FRtU5dU3XEWUqiNwfZEmPjRggJxgh8ITruHdXvF4lyJsfZ1+n4hc32GQfd/HtgqEe49ffh lz2fcK+CdFoiucmGGUpu2VH2tdGpjaMaqGt9gyJudT2l0ngy37BwKxVnk7PA1Q2WLveanT ryagOPwOXOdYSnpBTq7GUEQeRNH0Oe5LqnP44bBsV4TpUtRuzOS4dbEj+BuCfHHtXw4Mo9 +ZMVKR6yYc0XFu6i95EwUiZthDfwjsJ7vV9wYmlcHbJbDTzA5JdgUuZfgiI5MQ== 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 4VstnD1GRmz1B33; Sun, 2 Jun 2024 23:47:12 +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 452NlCoc056437; Sun, 2 Jun 2024 23:47:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 452NlC0W056434; Sun, 2 Jun 2024 23:47:12 GMT (envelope-from git) Date: Sun, 2 Jun 2024 23:47:12 GMT Message-Id: <202406022347.452NlC0W056434@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: a74b49650732 - main - 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/main X-Git-Reftype: branch X-Git-Commit: a74b496507329665c6aa8d0ef2ea42c2fbd88c48 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a74b496507329665c6aa8d0ef2ea42c2fbd88c48 commit a74b496507329665c6aa8d0ef2ea42c2fbd88c48 Author: Mark Johnston AuthorDate: 2024-02-04 23:32:53 +0000 Commit: Mark Johnston CommitDate: 2024-06-02 23:38:40 +0000 ahci: Use device_set_desc(f)() No functional change intended. MFC after: 1 week --- 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 b1f9c85141bb..b8cca377e47f 100644 --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -765,7 +765,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 7cc3ce18c8ae..69587da2226a 100644 --- a/sys/dev/ahci/ahci_pci.c +++ b/sys/dev/ahci/ahci_pci.c @@ -399,7 +399,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); @@ -430,22 +429,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); @@ -456,13 +453,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 8b941a73a4e0..97963784b561 100644 --- a/sys/dev/ahci/ahciem.c +++ b/sys/dev/ahci/ahciem.c @@ -63,7 +63,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); }