From nobody Sun Jun 09 14:12:06 2024 X-Original-To: dev-commits-src-branches@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 4VxxhR2JLXz5MCST; Sun, 09 Jun 2024 14:12:07 +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 4VxxhQ6tY7z4DDj; Sun, 9 Jun 2024 14:12:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717942327; 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=zHPVkMpLrxbPgCYyEjfBCLlPJgntFtcAXesryhMlcys=; b=oLbBIjx9XTGwDDZwEfBP/1B1wP7rmo2rMxYuCOt0sHf8WoBTMCXGOxPa1+peRIehF5/ChF 3XoIhvb+DzpCQBxA0k/E5K7540P4a8tU0Y7EOnjM6n5OxBKGFU5rZzZ06Zw7f8DM1iUp47 Fytdh7Xs/PtX7iwxjeszAQ1OF/FKoqZ3mquDPY3nxdb+dsyXOfGevxIfXB2LennIYZtgdg qil95sAsfA3JtMoq+LnblEqM6pE4evSIhDow5Fbv1W865X57c3Vr5M5cdxhCZ6vwAhALpY lRLS0K0jkrnLFThoJbHR97AQeOSEcnsq4W8Ko3/4bdCyuvJdWtiNmsH75wy6fQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717942327; a=rsa-sha256; cv=none; b=dj4UKR+JjBCYyqI0LOAQbkKmmDDjJkd1CnDIVpE5+/Y2vBJWjQD9LQCag3pFakiofGkseA J4Va1rMhzz2b1CdLIcBy93CyIEgdOpjuc8Gy5pfGadsTOwdZ62VdEFwhzaZnRmo8BqWwbo 63K6vIeV3owbz2neLdedZxMTOX/36OvBZTCDi6fEr+Q/V6+m0+HNNxdliXu7jJorIJHIgt QlKrG5oyZLlqEjpr2ahs9lCcDrt2bKvfDKt0sFdr12sz7j50lV3hwN6GSieglSJrgi5ahR JINiHyJaARkxA+jgabIFK4fSGyM6HEXxJpZ9NUL86218RJl4xEL/CA6OC9thmA== 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=1717942327; 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=zHPVkMpLrxbPgCYyEjfBCLlPJgntFtcAXesryhMlcys=; b=WeYKMg1NtBZa+UQn5jVLOLcfpuWabD6PBRtDGi814UwgXdXspxrcKXW50zconDaFETa/yE s5WcOpolaZ4Z1U3FvfqEfIppHxGxXZpOiF1ru/9s2Gme/k/zj9SLqrbX5JxBhqPsqauX19 lBSkGlO5Mkbj5oAJGT/3QvXVrR8NymNnKD/90XSoYlwzs7h387Wj6WoHs9M2YtshxI/cls DisxjUAAjZ9j9DSJyix5ndA9udFkLUs1kd/Rt2rYX8s7aKpl5UqhWTX/sLHSfxrPC7L8Rw U2Qq0xz6yUTWQeQ3uv5NltPdlD1FkzpadauZ/kXKXX1lofGP6oHBx4dFY9eA4g== 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 4VxxhQ6KNczlFZ; Sun, 9 Jun 2024 14:12:06 +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 459EC6Bx085672; Sun, 9 Jun 2024 14:12:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 459EC6EK085669; Sun, 9 Jun 2024 14:12:06 GMT (envelope-from git) Date: Sun, 9 Jun 2024 14:12:06 GMT Message-Id: <202406091412.459EC6EK085669@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 10f8a5c097f6 - stable/14 - etherswitch: Use device_set_desc(f)() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 10f8a5c097f6a54399dd9d00ae65d606d1264cd8 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=10f8a5c097f6a54399dd9d00ae65d606d1264cd8 commit 10f8a5c097f6a54399dd9d00ae65d606d1264cd8 Author: Mark Johnston AuthorDate: 2024-02-04 23:41:22 +0000 Commit: Mark Johnston CommitDate: 2024-06-09 13:37:51 +0000 etherswitch: Use device_set_desc(f)() No functional change intended. MFC after: 1 week (cherry picked from commit 54482989d34c94c6894cb51f65250a4d5946eb1b) --- 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); }