Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Jun 2024 20:37:51 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: b67f24852378 - main - nvmf: Use device_set_descf()
Message-ID:  <202406162037.45GKbpKC079287@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202406162037.45GKbpKC079287>