git: c07458f1931e - stable/14 - cfi: Use device_set_descf()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 27 Jun 2024 15:31:11 UTC
The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c07458f1931e27846cf260d5f0552149878a1cf1 commit c07458f1931e27846cf260d5f0552149878a1cf1 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-06-05 19:26:50 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-06-27 15:27:41 +0000 cfi: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit 2ef1f61df2d5961ffff1205d4800e46efadbf5ba) --- sys/dev/cfi/cfi_core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/dev/cfi/cfi_core.c b/sys/dev/cfi/cfi_core.c index 4e137140372c..9554a710d8f2 100644 --- a/sys/dev/cfi/cfi_core.c +++ b/sys/dev/cfi/cfi_core.c @@ -194,7 +194,6 @@ cfi_fmtsize(uint32_t sz) int cfi_probe(device_t dev) { - char desc[80]; struct cfi_softc *sc; char *vend_str; int error; @@ -279,9 +278,7 @@ cfi_probe(device_t dev) if (error) goto out; - snprintf(desc, sizeof(desc), "%s - %s", vend_str, - cfi_fmtsize(sc->sc_size)); - device_set_desc_copy(dev, desc); + device_set_descf(dev, "%s - %s", vend_str, cfi_fmtsize(sc->sc_size)); out: bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_rid, sc->sc_res);