git: 57d8375451c7 - stable/14 - msk: Use device_set_descf()

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

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

commit 57d8375451c7eb53049f45064afd60bd4c311391
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-06-05 14:20:58 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-06-27 15:27:41 +0000

    msk: Use device_set_descf()
    
    No functional change intended.
    
    MFC after:      1 week
    
    (cherry picked from commit 443f33481e461ae1f36e0110537131b972ec6a37)
---
 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 4b6954e7d067..ea6157cbbec6 100644
--- a/sys/dev/msk/if_msk.c
+++ b/sys/dev/msk/if_msk.c
@@ -1565,7 +1565,6 @@ static int
 msk_probe(device_t dev)
 {
 	struct msk_softc *sc;
-	char desc[100];
 
 	sc = device_get_softc(device_get_parent(dev));
 	/*
@@ -1574,11 +1573,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);
 }