From nobody Sun Jun 16 20:38:00 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 4W2PwS2lMpz5PR29; Sun, 16 Jun 2024 20:38:00 +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 4W2PwS1c4Kz3x3C; Sun, 16 Jun 2024 20:38:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718570280; 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=i5vuKDpxm6/k11K8ouECy2kIMsjAB39+ra/P7Nf64us=; b=tvaxARySzYSRaC9GIbPNLP21SKgF4wXBRmTQlHTAlo5961jKx+IcVAsfLiWkTIm+f5DKdQ ANnieCNnnQpH11gC8/SOSmyhQ8rjR4yiOtp78de6PhFkFBxi293uyDoThPFJiVpVr0EqVf vNsIN6seEC9qXqywdZSoTdbmltqE+sSgc3j14AsaFWS9Uy9VWJC73LmlS/dL2qqYjRcBbc 3WW2JN1zInROl1q1hF4faQPSB2VZLSTEPizf23G3e5i9H19kdcEYm7PzF5mH9O8kA3NCHz NIaysrt9lckuDADTOBL0vqM1iPLX2lQVwTD0WAUt0APxTR6N+h4R9YyAJWmGpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718570280; a=rsa-sha256; cv=none; b=RlPipNPTj8J6+Nx0C6MpfLOlQm1ij6JTGbDKvABZCOSfOK9zS4x4dUINNWn1deiQ7AthJc pJ+Do/R3ne5a3QRNZgHX1Gbgh8zIDY2lV1ius3RLCgkWpL+9hsSYrnhX3eJ5u+rXvSm9+3 ZNFledZxo7He6wP61iMCO2gcbskyA04w+Bqr6OM7f1NzCsdNmHB6wQ0kRcIaFrXVw9y3tX Io/wyICgo0vsM6MVIMor8AYqKv+yfXVTN5vLRPWzmPZAhEVk9xOL8iRzuglTRbZ+JM9KsD THuWSSNJnWcBAhn+T8lXwjHpBfBg+X9sGq9oPi5cr7WW3PkeP1+Ab8qiXLO0pg== 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=1718570280; 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=i5vuKDpxm6/k11K8ouECy2kIMsjAB39+ra/P7Nf64us=; b=bGLsvJUKk6/lRTUAk1MXf+rfz0gkJIu3vxwfxliMSOEfLFXHfVmMyDSyf0GtJc8+sKzGpr Ig9YAjQVOrRRgsT+NPozgtDTFsqa4MdnK+Lz0n1Lc0wvmhabuZWYdTdhtGhG6Y9R+xY+9h zhHkq1pDdTEN4R4S8r4z30iIKI4uwmZj3Dt4WopxOdWEY2uCO0vOe/PADCe8G9HbWwZifh ZqajBMIVGKBMxnkS8FrbkxabjinjBNtCVgnJgF8nOPPSAWiF4WPe51QQK7PoyalS/UirRB VpmqRrr/Nvv2qzb1HdXyiSqfqr9SHwR3iGpYyiF9PnG7hLLo942sg16Zxgz7kQ== 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 4W2PwS1BBLz12KT; Sun, 16 Jun 2024 20:38:00 +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 45GKc0P2079618; Sun, 16 Jun 2024 20:38:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GKc0Te079615; Sun, 16 Jun 2024 20:38:00 GMT (envelope-from git) Date: Sun, 16 Jun 2024 20:38:00 GMT Message-Id: <202406162038.45GKc0Te079615@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: 9da1b6dc161b - main - 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/main X-Git-Reftype: branch X-Git-Commit: 9da1b6dc161bfd7b494ba472cde33af49ef8196f Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9da1b6dc161bfd7b494ba472cde33af49ef8196f commit 9da1b6dc161bfd7b494ba472cde33af49ef8196f Author: Mark Johnston AuthorDate: 2024-06-05 19:24:16 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 20:37:26 +0000 bxe: Use device_set_descf() No functional change intended. MFC after: 1 week --- 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 8350d02cb2a3..38a45de95083 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++;