From nobody Thu Jun 27 15:31:08 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 4W92bJ4Mlyz5PtxF; Thu, 27 Jun 2024 15:31:08 +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 4W92bJ21Ggz4CMq; Thu, 27 Jun 2024 15:31:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719502268; 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=6gqtvgCZ/tzZqan8sTXagkbAGalkKteBsjyVe7kslCI=; b=jRec4R37m9KluX8iWRJA7MijYSFLOwFpXWjBEA4Cg7791aevTty6rDyJw6BDBGctYWdHna UcbKppsLUZXruv81vXUlZBaXIXSvepCFQAjJjj7rG49H7pd9PNAICy3a4hnzzS6NvJVpJy P1kRVV3Pe3Qy84h0Yc8MIZOPsUMRX71/dRW4pbLPbNeSSpRH2cu0MxNdkjoTeRcswD7dC7 8xh+fFjYhCSKcADa4ECsHM0cWLGXqrnsQekgPjhJMFpJMWA0tJKXUl9+AacCQiKoNG+Koq IniCSToZNUmutrt0K0jj6F+zN/KVdX8kwU19+yltYVt/aJVRR2PGuUlGblcHkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719502268; a=rsa-sha256; cv=none; b=soaIixefS7M/vxM/e+o8Uwoy3eC8769Sd+i5bODFYX8M3so8tYRe6s20zPmOH8uYoTmqgD /amL4oEI39n4VIblfepaaBSjfnXXwA+VdxtvZ52K4ODm7HWYSV5/rvNhFtlJTvo1mFYG8M fklSeQaLni2LXlWBgZt7Oa8q47p3+RHMvZDxW4VaDEiPZOKoc27PRpwbFtvgLBIx0FnCot DJ1J7AL1GtJ4zu+wkI/7hMYhopR9romIMvlm30gZZjZuX8SBlESvqXcgKzorP9FiWN7SIl /C/RYwc9nid+RBa3KoaR4iRlBOC03/PO4BoTnfADkf5IkZ7SDQehqiWIrO0EWQ== 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=1719502268; 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=6gqtvgCZ/tzZqan8sTXagkbAGalkKteBsjyVe7kslCI=; b=V4bqpiVGuDoAf6FAKikslYjuvKXRzFk3F1vLTZmU4AaMbVWQKjfs6F2oMJYxXqyDZZ9Aak /3E3vKsQ1+xoB9/pp9RN/3uyh1mcy9ZxW+qJzaoiltXbr02y846WBAlua9TqUv4Rpu5M6W R1qgDZA1NRop84Q2jf2KGchQDG+u6Vzf5JDw1LWV/SRmaW64qhdgpx7PI5vqnbVws2p637 O79Fmr0TH32+FSz/nzCoPF9gnpp/Mxkz8VheNBnYCwMoe3+sIh/A9h4LawTvZA/i91ZmGF 0+HchKUAW46HkhTx9bjIJoeMej9lOOEnqukhvogD0yNYQ4CBDoyiM45aSjOtEg== 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 4W92bJ1crjzJ65; Thu, 27 Jun 2024 15:31:08 +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 45RFV8fC078838; Thu, 27 Jun 2024 15:31:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45RFV8Dm078835; Thu, 27 Jun 2024 15:31:08 GMT (envelope-from git) Date: Thu, 27 Jun 2024 15:31:08 GMT Message-Id: <202406271531.45RFV8Dm078835@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: 4fcaee7a5f4a - stable/14 - bxe: Use device_set_descf() 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 4fcaee7a5f4ac12aeb9513755a816bd5b2953fa3 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4fcaee7a5f4ac12aeb9513755a816bd5b2953fa3 commit 4fcaee7a5f4ac12aeb9513755a816bd5b2953fa3 Author: Mark Johnston AuthorDate: 2024-06-05 19:24:16 +0000 Commit: Mark Johnston CommitDate: 2024-06-27 15:27:41 +0000 bxe: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit 9da1b6dc161bfd7b494ba472cde33af49ef8196f) --- sys/dev/bxe/bxe.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c index 86e396bad4ae..8524deeb354e 100644 --- a/sys/dev/bxe/bxe.c +++ b/sys/dev/bxe/bxe.c @@ -2489,7 +2489,6 @@ static int bxe_probe(device_t dev) { struct bxe_device_type *t; - char *descbuf; uint16_t did, sdid, svid, vid; /* Find our device structure */ @@ -2506,20 +2505,12 @@ bxe_probe(device_t dev) if ((vid == t->bxe_vid) && (did == t->bxe_did) && ((svid == t->bxe_svid) || (t->bxe_svid == PCI_ANY_ID)) && ((sdid == t->bxe_sdid) || (t->bxe_sdid == PCI_ANY_ID))) { - descbuf = malloc(BXE_DEVDESC_MAX, M_TEMP, M_NOWAIT); - if (descbuf == NULL) - return (ENOMEM); - - /* Print out the device identity. */ - snprintf(descbuf, BXE_DEVDESC_MAX, + device_set_descf(dev, "%s (%c%d) BXE v:%s", t->bxe_name, (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), (pci_read_config(dev, PCIR_REVID, 4) & 0xf), BXE_DRIVER_VERSION); - - device_set_desc_copy(dev, descbuf); - free(descbuf, M_TEMP); return (BUS_PROBE_DEFAULT); } t++;