git: 48ef9cff9c29 - main - amdsmn: Use device_set_descf()

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

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

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

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

diff --git a/sys/dev/amdsmn/amdsmn.c b/sys/dev/amdsmn/amdsmn.c
index ddb5be4c2c3c..d657ab84924a 100644
--- a/sys/dev/amdsmn/amdsmn.c
+++ b/sys/dev/amdsmn/amdsmn.c
@@ -185,7 +185,6 @@ static int
 amdsmn_probe(device_t dev)
 {
 	uint32_t family;
-	char buf[64];
 
 	if (resource_disabled("amdsmn", 0))
 		return (ENXIO);
@@ -202,9 +201,8 @@ amdsmn_probe(device_t dev)
 	default:
 		return (ENXIO);
 	}
-	snprintf(buf, sizeof(buf), "AMD Family %xh System Management Network",
+	device_set_descf(dev, "AMD Family %xh System Management Network",
 	    family);
-	device_set_desc_copy(dev, buf);
 
 	return (BUS_PROBE_GENERIC);
 }