git: dd8575e19ae0 - stable/14 - qlnx: Use device_set_descf()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 09 Jun 2024 14:12:09 UTC
The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=dd8575e19ae02e7e8a10abd8592ac764263e9176 commit dd8575e19ae02e7e8a10abd8592ac764263e9176 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-02-04 23:46:51 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-06-09 13:37:53 +0000 qlnx: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit 801b12ba89af6377e30c15b9b68443f0d60d50bf) --- sys/dev/qlnx/qlnxe/qlnx_os.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index 2b3732e748fd..21d39e809cc8 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -227,7 +227,6 @@ MODULE_DEPEND(if_qlnxev, ether, 1, 1, 1); MALLOC_DEFINE(M_QLNXBUF, "qlnxbuf", "Buffers for qlnx driver"); -char qlnx_dev_str[128]; char qlnx_ver_str[VER_SIZE]; char qlnx_name_str[NAME_SIZE]; @@ -374,60 +373,48 @@ qlnx_pci_probe(device_t dev) #ifndef QLNX_VF case QLOGIC_PCI_DEVICE_ID_1644: - snprintf(qlnx_dev_str, sizeof(qlnx_dev_str), "%s v%d.%d.%d", + device_set_descf(dev, "%s v%d.%d.%d", "Qlogic 100GbE PCI CNA Adapter-Ethernet Function", QLNX_VERSION_MAJOR, QLNX_VERSION_MINOR, QLNX_VERSION_BUILD); - device_set_desc_copy(dev, qlnx_dev_str); - break; case QLOGIC_PCI_DEVICE_ID_1634: - snprintf(qlnx_dev_str, sizeof(qlnx_dev_str), "%s v%d.%d.%d", + device_set_descf(dev, "%s v%d.%d.%d", "Qlogic 40GbE PCI CNA Adapter-Ethernet Function", QLNX_VERSION_MAJOR, QLNX_VERSION_MINOR, QLNX_VERSION_BUILD); - device_set_desc_copy(dev, qlnx_dev_str); - break; case QLOGIC_PCI_DEVICE_ID_1656: - snprintf(qlnx_dev_str, sizeof(qlnx_dev_str), "%s v%d.%d.%d", + device_set_descf(dev, "%s v%d.%d.%d", "Qlogic 25GbE PCI CNA Adapter-Ethernet Function", QLNX_VERSION_MAJOR, QLNX_VERSION_MINOR, QLNX_VERSION_BUILD); - device_set_desc_copy(dev, qlnx_dev_str); - break; case QLOGIC_PCI_DEVICE_ID_1654: - snprintf(qlnx_dev_str, sizeof(qlnx_dev_str), "%s v%d.%d.%d", + device_set_descf(dev, "%s v%d.%d.%d", "Qlogic 50GbE PCI CNA Adapter-Ethernet Function", QLNX_VERSION_MAJOR, QLNX_VERSION_MINOR, QLNX_VERSION_BUILD); - device_set_desc_copy(dev, qlnx_dev_str); - break; case QLOGIC_PCI_DEVICE_ID_8070: - snprintf(qlnx_dev_str, sizeof(qlnx_dev_str), "%s v%d.%d.%d", + device_set_descf(dev, "%s v%d.%d.%d", "Qlogic 10GbE/25GbE/40GbE PCI CNA (AH)" " Adapter-Ethernet Function", QLNX_VERSION_MAJOR, QLNX_VERSION_MINOR, QLNX_VERSION_BUILD); - device_set_desc_copy(dev, qlnx_dev_str); - break; #else case QLOGIC_PCI_DEVICE_ID_8090: - snprintf(qlnx_dev_str, sizeof(qlnx_dev_str), "%s v%d.%d.%d", + device_set_descf(dev, "%s v%d.%d.%d", "Qlogic SRIOV PCI CNA (AH) " "Adapter-Ethernet Function", QLNX_VERSION_MAJOR, QLNX_VERSION_MINOR, QLNX_VERSION_BUILD); - device_set_desc_copy(dev, qlnx_dev_str); - break; #endif /* #ifndef QLNX_VF */