git: b67f24852378 - main - nvmf: Use device_set_descf()

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

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

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

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

diff --git a/sys/dev/nvmf/host/nvmf.c b/sys/dev/nvmf/host/nvmf.c
index 47cdbe7e47fd..623c76954720 100644
--- a/sys/dev/nvmf/host/nvmf.c
+++ b/sys/dev/nvmf/host/nvmf.c
@@ -251,13 +251,11 @@ static int
 nvmf_probe(device_t dev)
 {
 	struct nvmf_ivars *ivars = device_get_ivars(dev);
-	char desc[260];
 
 	if (ivars == NULL)
 		return (ENXIO);
 
-	snprintf(desc, sizeof(desc), "Fabrics: %.256s", ivars->cdata->subnqn);
-	device_set_desc_copy(dev, desc);
+	device_set_descf(dev, "Fabrics: %.256s", ivars->cdata->subnqn);
 	return (BUS_PROBE_DEFAULT);
 }