The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a1b84451159fbad069ccaa4b5197a3fde7eae902
commit a1b84451159fbad069ccaa4b5197a3fde7eae902 Author: Mark Johnston <ma...@freebsd.org> AuthorDate: 2024-02-04 23:38:04 +0000 Commit: Mark Johnston <ma...@freebsd.org> CommitDate: 2024-06-02 23:38:40 +0000 cxgbe: Use device_set_descf() No functional change intended. MFC after: 1 week --- sys/dev/cxgbe/t4_main.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 185cc1140486..03b674cb9241 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -2522,11 +2522,9 @@ reset_adapter_task(void *arg, int pending) static int cxgbe_probe(device_t dev) { - char buf[128]; struct port_info *pi = device_get_softc(dev); - snprintf(buf, sizeof(buf), "port %d", pi->port_id); - device_set_desc_copy(dev, buf); + device_set_descf(dev, "port %d", pi->port_id); return (BUS_PROBE_DEFAULT); } @@ -3499,12 +3497,10 @@ done: static int vcxgbe_probe(device_t dev) { - char buf[128]; struct vi_info *vi = device_get_softc(dev); - snprintf(buf, sizeof(buf), "port %d vi %td", vi->pi->port_id, + device_set_descf(dev, "port %d vi %td", vi->pi->port_id, vi - vi->pi->vi); - device_set_desc_copy(dev, buf); return (BUS_PROBE_DEFAULT); } @@ -5768,12 +5764,9 @@ set_params__post_init(struct adapter *sc) static void t4_set_desc(struct adapter *sc) { - char buf[128]; struct adapter_params *p = &sc->params; - snprintf(buf, sizeof(buf), "Chelsio %s", p->vpd.id); - - device_set_desc_copy(sc->dev, buf); + device_set_descf(sc->dev, "Chelsio %s", p->vpd.id); } static inline void