git: 443f33481e46 - main - msk: Use device_set_descf()

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Sun, 16 Jun 2024 20:37:55 UTC
The branch main has been updated by markj:

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

commit 443f33481e461ae1f36e0110537131b972ec6a37
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-06-05 14:20:58 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-06-16 20:37:26 +0000

    msk: Use device_set_descf()
    
    No functional change intended.
    
    MFC after:      1 week
---
 sys/dev/msk/if_msk.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sys/dev/msk/if_msk.c b/sys/dev/msk/if_msk.c
index bb00ffc7ae34..2165cb73f7cd 100644
--- a/sys/dev/msk/if_msk.c
+++ b/sys/dev/msk/if_msk.c
@@ -1564,7 +1564,6 @@ static int
 msk_probe(device_t dev)
 {
 	struct msk_softc *sc;
-	char desc[100];
 
 	sc = device_get_softc(device_get_parent(dev));
 	/*
@@ -1573,11 +1572,10 @@ msk_probe(device_t dev)
 	 * mskc_attach() will create a second device instance
 	 * for us.
 	 */
-	snprintf(desc, sizeof(desc),
+	device_set_descf(dev,
 	    "Marvell Technology Group Ltd. %s Id 0x%02x Rev 0x%02x",
 	    model_name[sc->msk_hw_id - CHIP_ID_YUKON_XL], sc->msk_hw_id,
 	    sc->msk_hw_rev);
-	device_set_desc_copy(dev, desc);
 
 	return (BUS_PROBE_DEFAULT);
 }