From nobody Sun Jun 02 23:47:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VstnL5CzMz5LVQ3; Sun, 02 Jun 2024 23:47:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VstnL12nkz4B1r; Sun, 2 Jun 2024 23:47:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717372038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BQWPwAemv+3K3wvdxVa4qAXEjnSTCFi1akE6kmc2Uvk=; b=HCDSrVId6A+MTTBBf5f2WnfF9RoJEErsWQaS+VHaW+JbiRpLnPNKcafhRJpsQcSKNIkvIv 4g2ql66tuTCatBbrZHBGNNgKDhbuaquSniN53YK0Lp/cmbogNo3Tb6brHr1XEb1+we3BOP Q93CFF5AmlXMboe833YBabzBkuykjJ+IuSg04/FEkhcbq79EvfWEowmX6csszCUqC0Jc05 NDrVmfCp2ZiTe4C07lSNzwFYYGXv3zW40TxyvNbIhUBOfpEriQ9vw5ybbz8ictuS+ilM7x sTydd8CysxdUOffVDUWg+dLSUc6o9vwDS2llANvNihpo9uxNSxNQNrpFOOilqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717372038; a=rsa-sha256; cv=none; b=QPQtI2F5b8VEp0M4EGO+wf9gNjD7vrXnGiOAeI42ndNWfwWYbKmtF6vxXBaxHDni3Ouap9 PPNGZA5EnWULfz/yzFkUoW0jB3Iv9j25SEhNstZrV5G5CzoMKoaBklp16T5+eHJseCVRa0 9REO24a+Ab3v7x3Q7/Qo3Hb8A41EEmroctkH9D5T4wQZLLdCWD64KisAW6VrgoaKDlHGKu nUJ3qmLr5SHs0a7fj+kwEOeI3Ln8yjq81AktvYj6wbA9+7F59Ng7JDNHm3fm2R014PgVr1 VadJrjrrimu4upvqiRU2YocvBuJgJpWWMWZFJswTImhQUZk+Zbik5zAMjBfcNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717372038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BQWPwAemv+3K3wvdxVa4qAXEjnSTCFi1akE6kmc2Uvk=; b=CVn9gaTQ094BynoGDRLWHiLqTRJYZtS1CVtEtGOKVQcSO8mj2k7s2xl3gn22c3gybh8bCG cgy93NCqEUo12ACqyHAmjI6B7GQrtULW/+8IAUlWlxlNUl6NtIveQStndBHi4n+aBkmy0y SmcAvxTeG22jZEHnx5/79VpEe2uxU91dx2P0fUuTUFknNRkAvm+pPVj7PLPNpz9EaiMWQV f2NB/L8ec9TN3jed0qRvIEdxZHX19f1F3jy9f+fEil6z4c8Hb79MD4BRgvA0yeOb0lZLlj d3erRwoL9ND7Z2mqJv+b093gMjIMV4I5WOrazSQy/Q+wuKPSj0XGUEEjxTepdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VstnK6Nchz1Bj8; Sun, 2 Jun 2024 23:47:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 452NlHdf056627; Sun, 2 Jun 2024 23:47:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 452NlHRY056624; Sun, 2 Jun 2024 23:47:17 GMT (envelope-from git) Date: Sun, 2 Jun 2024 23:47:17 GMT Message-Id: <202406022347.452NlHRY056624@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 54482989d34c - main - etherswitch: Use device_set_desc(f)() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 54482989d34c94c6894cb51f65250a4d5946eb1b Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=54482989d34c94c6894cb51f65250a4d5946eb1b commit 54482989d34c94c6894cb51f65250a4d5946eb1b Author: Mark Johnston AuthorDate: 2024-02-04 23:41:22 +0000 Commit: Mark Johnston 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); }