git: 54482989d34c - main - etherswitch: Use device_set_desc(f)()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 02 Jun 2024 23:47:17 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=54482989d34c94c6894cb51f65250a4d5946eb1b
commit 54482989d34c94c6894cb51f65250a4d5946eb1b
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-02-04 23:41:22 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-06-02 23:38:41 +0000
etherswitch: Use device_set_desc(f)()
No functional change intended.
MFC after: 1 week
---
sys/dev/etherswitch/arswitch/arswitch.c | 9 +++------
sys/dev/etherswitch/e6000sw/e6060sw.c | 4 +---
sys/dev/etherswitch/infineon/adm6996fc.c | 2 +-
sys/dev/etherswitch/ip17x/ip17x.c | 2 +-
sys/dev/etherswitch/micrel/ksz8995ma.c | 2 +-
sys/dev/etherswitch/mtkswitch/mtkswitch.c | 2 +-
sys/dev/etherswitch/ukswitch/ukswitch.c | 2 +-
7 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/sys/dev/etherswitch/arswitch/arswitch.c b/sys/dev/etherswitch/arswitch/arswitch.c
index 1c2bcefdfe91..70f3ad501d5d 100644
--- a/sys/dev/etherswitch/arswitch/arswitch.c
+++ b/sys/dev/etherswitch/arswitch/arswitch.c
@@ -95,7 +95,7 @@ arswitch_probe(device_t dev)
{
struct arswitch_softc *sc;
uint32_t id;
- char *chipname, desc[256];
+ char *chipname;
sc = device_get_softc(dev);
bzero(sc, sizeof(*sc));
@@ -132,12 +132,9 @@ arswitch_probe(device_t dev)
DPRINTF(sc, ARSWITCH_DBG_ANY, "chipname=%s, id=%08x\n", chipname, id);
if (chipname != NULL) {
- snprintf(desc, sizeof(desc),
+ device_set_descf(dev,
"Atheros %s Ethernet Switch (ver %d rev %d)",
- chipname,
- sc->chip_ver,
- sc->chip_rev);
- device_set_desc_copy(dev, desc);
+ chipname, sc->chip_ver, sc->chip_rev);
return (BUS_PROBE_DEFAULT);
}
return (ENXIO);
diff --git a/sys/dev/etherswitch/e6000sw/e6060sw.c b/sys/dev/etherswitch/e6000sw/e6060sw.c
index 19744f5e44a5..8bc482af24e8 100644
--- a/sys/dev/etherswitch/e6000sw/e6060sw.c
+++ b/sys/dev/etherswitch/e6000sw/e6060sw.c
@@ -162,7 +162,6 @@ e6060sw_probe(device_t dev)
struct e6060sw_softc *sc;
int devid, i;
char *devname;
- char desc[80];
sc = device_get_softc(dev);
bzero(sc, sizeof(*sc));
@@ -193,9 +192,8 @@ e6060sw_probe(device_t dev)
else
return (ENXIO);
- sprintf(desc, "Marvell %s MDIO switch driver at 0x%02x",
+ device_set_descf(dev, "Marvell %s MDIO switch driver at 0x%02x",
devname, sc->smi_offset);
- device_set_desc_copy(dev, desc);
return (BUS_PROBE_DEFAULT);
}
diff --git a/sys/dev/etherswitch/infineon/adm6996fc.c b/sys/dev/etherswitch/infineon/adm6996fc.c
index cc67616d9fdf..95a24a2fb37a 100644
--- a/sys/dev/etherswitch/infineon/adm6996fc.c
+++ b/sys/dev/etherswitch/infineon/adm6996fc.c
@@ -153,7 +153,7 @@ adm6996fc_probe(device_t dev)
return (ENXIO);
}
- device_set_desc_copy(dev, "Infineon ADM6996FC/M/MX MDIO switch driver");
+ device_set_desc(dev, "Infineon ADM6996FC/M/MX MDIO switch driver");
return (BUS_PROBE_DEFAULT);
}
diff --git a/sys/dev/etherswitch/ip17x/ip17x.c b/sys/dev/etherswitch/ip17x/ip17x.c
index 65e548ba293b..45119ded83a9 100644
--- a/sys/dev/etherswitch/ip17x/ip17x.c
+++ b/sys/dev/etherswitch/ip17x/ip17x.c
@@ -152,7 +152,7 @@ ip17x_probe(device_t dev)
(void) resource_int_value(device_get_name(dev), device_get_unit(dev),
"mii-poll", &sc->miipoll);
#endif
- device_set_desc_copy(dev, "IC+ IP17x switch driver");
+ device_set_desc(dev, "IC+ IP17x switch driver");
return (BUS_PROBE_DEFAULT);
}
diff --git a/sys/dev/etherswitch/micrel/ksz8995ma.c b/sys/dev/etherswitch/micrel/ksz8995ma.c
index 43292d3b2007..2b5af2a5625a 100644
--- a/sys/dev/etherswitch/micrel/ksz8995ma.c
+++ b/sys/dev/etherswitch/micrel/ksz8995ma.c
@@ -197,7 +197,7 @@ ksz8995ma_probe(device_t dev)
return (ENXIO);
}
- device_set_desc_copy(dev, "Micrel KSZ8995MA SPI switch driver");
+ device_set_desc(dev, "Micrel KSZ8995MA SPI switch driver");
return (BUS_PROBE_DEFAULT);
}
diff --git a/sys/dev/etherswitch/mtkswitch/mtkswitch.c b/sys/dev/etherswitch/mtkswitch/mtkswitch.c
index 6e235097f189..75f7cbfa6941 100644
--- a/sys/dev/etherswitch/mtkswitch/mtkswitch.c
+++ b/sys/dev/etherswitch/mtkswitch/mtkswitch.c
@@ -100,7 +100,7 @@ mtkswitch_probe(device_t dev)
bzero(sc, sizeof(*sc));
sc->sc_switchtype = switch_type;
- device_set_desc_copy(dev, "MTK Switch Driver");
+ device_set_desc(dev, "MTK Switch Driver");
return (0);
}
diff --git a/sys/dev/etherswitch/ukswitch/ukswitch.c b/sys/dev/etherswitch/ukswitch/ukswitch.c
index 88726422bd01..c1e23f7c0f65 100644
--- a/sys/dev/etherswitch/ukswitch/ukswitch.c
+++ b/sys/dev/etherswitch/ukswitch/ukswitch.c
@@ -106,7 +106,7 @@ ukswitch_probe(device_t dev)
sc = device_get_softc(dev);
bzero(sc, sizeof(*sc));
- device_set_desc_copy(dev, "Generic MDIO switch driver");
+ device_set_desc(dev, "Generic MDIO switch driver");
return (BUS_PROBE_DEFAULT);
}