git: 239c9c6de125 - stable/14 - hptiop: Use device_set_descf()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 22 Jul 2024 00:55:37 UTC
The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=239c9c6de1250cc53f9f063fe9c698373aa9709c commit 239c9c6de1250cc53f9f063fe9c698373aa9709c Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-07-14 16:18:27 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-07-22 00:55:27 +0000 hptiop: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit 1c64b3aba3d0e2910ac52c18e3c240348eb3e36e) --- sys/dev/hptiop/hptiop.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/dev/hptiop/hptiop.c b/sys/dev/hptiop/hptiop.c index aa1251796bf1..bdb545be5b7e 100644 --- a/sys/dev/hptiop/hptiop.c +++ b/sys/dev/hptiop/hptiop.c @@ -1799,7 +1799,6 @@ static int hptiop_probe(device_t dev) { struct hpt_iop_hba *hba; u_int32_t id; - static char buf[256]; int sas = 0; struct hptiop_adapter_ops *ops; @@ -1852,9 +1851,8 @@ static int hptiop_probe(device_t dev) pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev), pci_get_irq(dev)); - sprintf(buf, "RocketRAID %x %s Controller\n", - id, sas ? "SAS" : "SATA"); - device_set_desc_copy(dev, buf); + device_set_descf(dev, "RocketRAID %x %s Controller", + id, sas ? "SAS" : "SATA"); hba = (struct hpt_iop_hba *)device_get_softc(dev); bzero(hba, sizeof(struct hpt_iop_hba));