git: ddb9040fc2e9 - stable/14 - oce: Use device_set_descf()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 27 Jun 2024 15:31:12 UTC
The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ddb9040fc2e972f99f379f9f18f551ee854f9107 commit ddb9040fc2e972f99f379f9f18f551ee854f9107 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-06-05 19:28:13 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-06-27 15:27:41 +0000 oce: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit c704b87ba679563cb8b344da69aa3cb7118a10b0) --- sys/dev/oce/oce_if.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/dev/oce/oce_if.c b/sys/dev/oce/oce_if.c index d7ec58ec1f5e..2084b9c84fff 100644 --- a/sys/dev/oce/oce_if.c +++ b/sys/dev/oce/oce_if.c @@ -252,7 +252,6 @@ oce_probe(device_t dev) uint16_t vendor = 0; uint16_t device = 0; int i = 0; - char str[256] = {0}; POCE_SOFTC sc; sc = device_get_softc(dev); @@ -265,9 +264,9 @@ oce_probe(device_t dev) for (i = 0; i < (sizeof(supportedDevices) / sizeof(uint32_t)); i++) { if (vendor == ((supportedDevices[i] >> 16) & 0xffff)) { if (device == (supportedDevices[i] & 0xffff)) { - sprintf(str, "%s:%s", "Emulex CNA NIC function", - component_revision); - device_set_desc_copy(dev, str); + device_set_descf(dev, + "%s:%s", "Emulex CNA NIC function", + component_revision); switch (device) { case PCI_PRODUCT_BE2: