git: d0983e084ba2 - stable/14 - liquidio: Use device_set_descf()

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Thu, 27 Jun 2024 15:31:04 UTC
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=d0983e084ba20799ed59deb69f77e10a25d7ef87

commit d0983e084ba20799ed59deb69f77e10a25d7ef87
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-06-05 14:26:22 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-06-27 15:27:41 +0000

    liquidio: Use device_set_descf()
    
    No functional change intended.
    
    MFC after:      1 week
    
    (cherry picked from commit 1794a0a87e0cecee1ef63fcf4f0a8a6cf6945dc8)
---
 sys/dev/liquidio/lio_main.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/sys/dev/liquidio/lio_main.c b/sys/dev/liquidio/lio_main.c
index bec510af0c65..aa52612dda04 100644
--- a/sys/dev/liquidio/lio_main.c
+++ b/sys/dev/liquidio/lio_main.c
@@ -200,7 +200,6 @@ lio_probe(device_t dev)
 	uint16_t	device_id;
 	uint16_t	subdevice_id;
 	uint8_t		revision_id;
-	char		device_ver[256];
 
 	vendor_id = pci_get_vendor(dev);
 	if (vendor_id != PCI_VENDOR_ID_CAVIUM)
@@ -216,9 +215,8 @@ lio_probe(device_t dev)
 		    (device_id == tbl->device_id) &&
 		    (subdevice_id == tbl->subdevice_id) &&
 		    (revision_id == tbl->revision_id)) {
-			sprintf(device_ver, "%s, Version - %s",
-				lio_strings[tbl->index], LIO_VERSION);
-			device_set_desc_copy(dev, device_ver);
+			device_set_descf(dev, "%s, Version - %s",
+			    lio_strings[tbl->index], LIO_VERSION);
 			return (BUS_PROBE_DEFAULT);
 		}