From nobody Sun Jun 02 23:47:22 2024 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 4VstnR35zNz5LVdR; Sun, 02 Jun 2024 23:47:23 +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 4VstnQ4Ky8z4BYg; Sun, 2 Jun 2024 23:47:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717372042; 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=BA6bfyqZPVcVyZcVdfQ4Sh8NnkI37QlTxsnwMskVxfw=; b=K6uJ+GLyuolmd8Z/Esca6/XHvmxTpwIjNXvreXPFpu4k2/9FGQE/sGlnav2EneDi8JFfFN vcYnJDmZXp4cNOxPe/Yyk/Q3dFxdhmGStAusEJu1xD9scSBg2WAM4yoC257c8vWG2iiSza amwNXpLCodUZKQ6ZpByczIbu0TM3vApBuxiR1GdNYvRrih7LlyieO97IjkORQg7lkzRGMe OUw4EsqyONssmiMcj0vaJNpI4U6vVrvD3eB8dmr//b/cipT0ObzVmuw/07y/bLVrHWiZ3X 8J79I5B+YgSFd3gTVrFTI66x0jKJhsx6UmsGrfenFcb1YN4GHAcnDwGJ/g+ebg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717372042; a=rsa-sha256; cv=none; b=KUrT3WmxvJUlgl7a8U+7w8W6yAz4/ufHZodDQQpH/nsAduKnMsu4/Aqv/DKr2RFS9XU4tY cvZDIhEGASriZfcWJebzY4PAQtefZQsn3PByjozOoONXHpgyhDZmwdiXAsNaL4yLW5j5rd uI39EuDwTF8k9zogqHxC14iB65Wup0mdJ6jMd+9i9elfAlsQC0/+HfnwGOPpFRMR9DgNKI QUMVG1tFwybPWkfaKpBBrbHYD7BtyMm9sAuFx956+4AhSnNEI8SBBOqBGHcDQRos5JegxM f9LZy/TaZ7RYyYpNMnv7vr2UexyxFY1vOX+ZzJoRdAcJ3orAjzLAgb5w1Dja2w== 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=1717372042; 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=BA6bfyqZPVcVyZcVdfQ4Sh8NnkI37QlTxsnwMskVxfw=; b=DC09Fzwn7MS9dOilowWgPWskDSJvou9HQl1kpr0RDUSNQ/KexSK+TytL0tOQuxgaFmcACg IqdxJDdy+2C7lw5JJTLpe3s+7tjKI/aUi/WGWqrR/oFy7xgAPr6idhRacVeV7YEtkldUlx IszUJ+iv83RnWNTS+Gp4AVL7OKlm1W7PGa0Co+F59yMwtSVDSHwsroTbARs+b/wvJR/W4h hNmq/FBFYta8FF1OgyyoEQfPNPQzupa7NAR/dSIIzguDWoqNDfe6kWAT/Tp+EIZCurnBRX r+0uIR0WNyEUkyDYkkDw9fY0iKWPtr/EAib3Kc1fpaJQkhSaZJN55z6JjV0pjA== 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 4VstnQ2X13z1BfV; Sun, 2 Jun 2024 23:47:22 +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 452NlMHu056776; Sun, 2 Jun 2024 23:47:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 452NlM2Z056772; Sun, 2 Jun 2024 23:47:22 GMT (envelope-from git) Date: Sun, 2 Jun 2024 23:47:22 GMT Message-Id: <202406022347.452NlM2Z056772@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: de140d60d528 - main - virtio: Use device_set_descf() 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: de140d60d5282b0dbf79979d04d5b6b11511e25d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=de140d60d5282b0dbf79979d04d5b6b11511e25d commit de140d60d5282b0dbf79979d04d5b6b11511e25d Author: Mark Johnston AuthorDate: 2024-02-04 23:52:23 +0000 Commit: Mark Johnston CommitDate: 2024-06-02 23:38:41 +0000 virtio: Use device_set_descf() No functional change intended. MFC after: 1 week --- sys/dev/virtio/pci/virtio_pci_legacy.c | 4 +--- sys/dev/virtio/pci/virtio_pci_modern.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/sys/dev/virtio/pci/virtio_pci_legacy.c b/sys/dev/virtio/pci/virtio_pci_legacy.c index 238434c350fb..18dbb00e0d8c 100644 --- a/sys/dev/virtio/pci/virtio_pci_legacy.c +++ b/sys/dev/virtio/pci/virtio_pci_legacy.c @@ -190,7 +190,6 @@ DRIVER_MODULE(virtio_pci_legacy, pci, vtpci_legacy_driver, 0, 0); static int vtpci_legacy_probe(device_t dev) { - char desc[64]; const char *name; if (pci_get_vendor(dev) != VIRTIO_PCI_VENDORID) @@ -207,8 +206,7 @@ vtpci_legacy_probe(device_t dev) if (name == NULL) name = "Unknown"; - snprintf(desc, sizeof(desc), "VirtIO PCI (legacy) %s adapter", name); - device_set_desc_copy(dev, desc); + device_set_descf(dev, "VirtIO PCI (legacy) %s adapter", name); /* Prefer transitional modern VirtIO PCI. */ return (BUS_PROBE_LOW_PRIORITY); diff --git a/sys/dev/virtio/pci/virtio_pci_modern.c b/sys/dev/virtio/pci/virtio_pci_modern.c index 8f9b1f21aeab..eb1d5a1e6989 100644 --- a/sys/dev/virtio/pci/virtio_pci_modern.c +++ b/sys/dev/virtio/pci/virtio_pci_modern.c @@ -244,7 +244,6 @@ DRIVER_MODULE(virtio_pci_modern, pci, vtpci_modern_driver, 0, 0); static int vtpci_modern_probe(device_t dev) { - char desc[64]; const char *name; uint16_t devid; @@ -269,8 +268,7 @@ vtpci_modern_probe(device_t dev) if (name == NULL) name = "Unknown"; - snprintf(desc, sizeof(desc), "VirtIO PCI (modern) %s adapter", name); - device_set_desc_copy(dev, desc); + device_set_descf(dev, "VirtIO PCI (modern) %s adapter", name); return (BUS_PROBE_DEFAULT); }