git: 1c64b3aba3d0 - main - hptiop: Use device_set_descf()

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Sun, 14 Jul 2024 18:30:20 UTC
The branch main has been updated by markj:

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

commit 1c64b3aba3d0e2910ac52c18e3c240348eb3e36e
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-07-14 16:18:27 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-07-14 18:29:15 +0000

    hptiop: Use device_set_descf()
    
    No functional change intended.
    
    MFC after:      1 week
---
 sys/dev/hptiop/hptiop.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/sys/dev/hptiop/hptiop.c b/sys/dev/hptiop/hptiop.c
index 547957c30ef1..8252dbad4a07 100644
--- a/sys/dev/hptiop/hptiop.c
+++ b/sys/dev/hptiop/hptiop.c
@@ -1798,7 +1798,6 @@ static int hptiop_probe(device_t dev)
 {
 	struct hpt_iop_hba *hba;
 	u_int32_t id;
-	static char buf[256];
 	int sas = 0;
 	struct hptiop_adapter_ops *ops;
 
@@ -1851,9 +1850,8 @@ static int hptiop_probe(device_t dev)
 		pci_get_bus(dev), pci_get_slot(dev),
 		pci_get_function(dev), pci_get_irq(dev));
 
-	sprintf(buf, "RocketRAID %x %s Controller\n",
-				id, sas ? "SAS" : "SATA");
-	device_set_desc_copy(dev, buf);
+	device_set_descf(dev, "RocketRAID %x %s Controller",
+	    id, sas ? "SAS" : "SATA");
 
 	hba = (struct hpt_iop_hba *)device_get_softc(dev);
 	bzero(hba, sizeof(struct hpt_iop_hba));