From nobody Sun Jun 09 14:12:11 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 4VxxhW5pyYz5MCMy; Sun, 09 Jun 2024 14:12:11 +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 4VxxhW43ZKz4DCN; Sun, 9 Jun 2024 14:12:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717942331; 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=L/Xw157W2vVzl3B4ioEBG+/3YX4MCA97SE4qiWizFmo=; b=rathkziUw4iiscwxv/z/rXlHhd6M73sp+aecGKwh3H/8XSMF0Efwmy4CB7UoNl9I+J1gEz UbMlLqQZjnBKTk6ac4NcXj14GPxGxD8P4+QT0BqrgGj06UuVdNfQjZwHV96LFHGWsDdzO5 rwpuMcJm65wzrhhp6XOCBLic05h8AabEI3/jLe3SIWdFpeUeSw/2e+CoP9sn8QEGKk/4Lx ElgAeec1GW/wph3ZpsDGqnZtSZOzt04KNXRtV9ZdbXQy3stUW9sthNn/jpF8HAZXSt7/i4 KqCZH5KzLxm6gLqdhNJUAWbMUtcRLPhEI7nGsJ4lD58bS8a+L2aRI0OrRTomIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717942331; a=rsa-sha256; cv=none; b=bJvb6DvYhAj38a1222W44PrHy5kXdQCKgHiGbt/EQUcWUmixRYGR+oYBDrxm0zMaRwlEw5 rPcmH2e3APCR7ZskQC8I4hGZikN66tCgwxKGS1kG7tZbpQZpF7bmgfKQw0N5QwWqnYtxP3 cYCJZp4zqg0UHIZPBCVjLHAecxgKkcfKlMWALBfs1WB2z6JQ1Sw2jRpYZBk0DVj+twMsIr pDuL+Vflhx8E78v0+8l7DEzhbF6PCJmWK6U7wZ3SRxmcshzqambIT/LXgJEw3hdVTOvKew /3XDlbbBauzM+UDRwTGtIluApQo6/2ul6v5Lb4G0xDMkhcEdhd0ZOjTdtxOk7w== 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=1717942331; 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=L/Xw157W2vVzl3B4ioEBG+/3YX4MCA97SE4qiWizFmo=; b=ZAc6kmXNyugs5t+aZcq9z/g6A11sfLinGawBIScZHKTbuBuYtjttp4py/0HI2umSgdFytu sUdDGvr7JkrSgd6kU+nc700gqXRG5ZuOKhBn7Qbz++qATB8XL62a0nMKRx0+pi78haCpxX 7UHmLgBt3o4+JHBkx04H/t9pimf0blVmRUOHPqLJLYZHyyo1FrCd1MiWsyCXN7kYWdcfDm L4hzLQD9KbzjlyMSBgsNud8GQRK42jua/jI//Bc+v50zomOEQGWMD32Ff5OKxCShmng/8g rpv8BL6MwP+hEV90resTq9AX4wxxS/nlEE19kS8JUSAdQwNXBe/2KQ2UdRTQAQ== 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 4VxxhW3L5Xzm30; Sun, 9 Jun 2024 14:12:11 +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 459ECBpx085822; Sun, 9 Jun 2024 14:12:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 459ECBPq085819; Sun, 9 Jun 2024 14:12:11 GMT (envelope-from git) Date: Sun, 9 Jun 2024 14:12:11 GMT Message-Id: <202406091412.459ECBPq085819@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: ea71ec44e200 - stable/14 - virtio: Use device_set_descf() 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: ea71ec44e20079fb922dff7df8a06495768ddae7 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ea71ec44e20079fb922dff7df8a06495768ddae7 commit ea71ec44e20079fb922dff7df8a06495768ddae7 Author: Mark Johnston AuthorDate: 2024-02-04 23:52:23 +0000 Commit: Mark Johnston CommitDate: 2024-06-09 13:37:56 +0000 virtio: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit de140d60d5282b0dbf79979d04d5b6b11511e25d) --- 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 88a8323bdd6f..cf574160cdd4 100644 --- a/sys/dev/virtio/pci/virtio_pci_legacy.c +++ b/sys/dev/virtio/pci/virtio_pci_legacy.c @@ -191,7 +191,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) @@ -208,8 +207,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 2fa921dd9141..2e59448b4b5e 100644 --- a/sys/dev/virtio/pci/virtio_pci_modern.c +++ b/sys/dev/virtio/pci/virtio_pci_modern.c @@ -245,7 +245,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; @@ -270,8 +269,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); }