From nobody Thu Aug 25 17:31:36 2022 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 4MD94S6PKGz4b3BL; Thu, 25 Aug 2022 17:31:36 +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 4MD94S5lJNz3L1L; Thu, 25 Aug 2022 17:31:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661448696; 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=q9PVe9Z3ES7TLg/ROjLDDG4G2eJGwL5fD+2kageI2ps=; b=FPs7z1eVshKmmr/eLOAbMLgzac8pxJ5iDX7Fn/INREb1z3uKb9k4qhyHhG7XVvfdgiD37t ubg16q9Ea+9W7bkgdtjfculO5wKIDFcBSM72WpGjqy0FirU4Ytw/ti/iwGllBZz3+5lDZo /ddbdGhSh5AGUYwOtseYk+vnkg4Easm4QrtH5VJK/vOW1OvYqlrhGFrJRba2Uh0buMZWA7 feCt1y6823fRbQsTT7XXWYkC8zNur72CLQ11PQSaAvGHf5U1097GqRXSnjiXlFOGlQBgGo hIUEnhiQG4ekBTLX953K1DTX4rcEBYpfANbWSEgMIuPkAv7nc0wgbCr/X8GDkw== 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 4MD94S4f7Vzwk4; Thu, 25 Aug 2022 17:31:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27PHVaOC042144; Thu, 25 Aug 2022 17:31:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27PHVati042143; Thu, 25 Aug 2022 17:31:36 GMT (envelope-from git) Date: Thu, 25 Aug 2022 17:31:36 GMT Message-Id: <202208251731.27PHVati042143@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a88b3991e2b2 - stable/13 - bhyve: Style fix for read/write_config. 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a88b3991e2b2d20c46871805d88da0c3559331c4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661448696; 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=q9PVe9Z3ES7TLg/ROjLDDG4G2eJGwL5fD+2kageI2ps=; b=PcXNQYV42oWcdLfYAKqq23B+KhF1qA2UMOwTliTw0svMfnCJsDEHdnVvIUkkG13ppwh2jq exMNOM9XhgjZeWteFRii6x0PhEq0dSnsUjLAlwQOU1nIWNqUJWflAG62WMaOM+nCJgna+X K+YIalhjqKfC5WhgQfEeBpGZEjopwQid4mCJgjV/2XEZL1DdaePuyXKcbRhAYpwvSSLKB4 j4a+l3Xf3tEO7RXaDyLEARjyaMrUSl0TEGPLAackHUJ+5IqLLKVertZKXz9eJPqzbZuQf7 nznMtB9245GqVzY1oEFiLuCGjCUh56l6783kszSHGAUJ1XOSb6t0q6tn8mV3HQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661448696; a=rsa-sha256; cv=none; b=VU/OgkuoJCw15Godo/23Oxx0w5vH8ooU0sdLjIQxtZNITWD7P6Gg9acoBdmYJi66ERKl9Y VoE56w/GRD7DJGfH05nbF5qXZnOsvs2gJ4AGTOcE4ZrdqCuKVmHPRY8HHBLIzUsVT6fobj wYNZ6Y03Fy5i0DrucHcfS4sLoY1VTX69jUYQic16/qve6M/T+5naKYhbmR12ogVl7Nkh2v T68TmuklmJkLM2cULB/RXz6ye4GAisyaiUYUFhaEolQU7TLvJZzUj9f1VmwvL4x0xM9tYw E0gyRFFOPYVEmTdOgL2D5YFWMi3pHY+I7sm9ruF0mm3Zyy57PIhbAuuKHVNn2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a88b3991e2b2d20c46871805d88da0c3559331c4 commit a88b3991e2b2d20c46871805d88da0c3559331c4 Author: John Baldwin AuthorDate: 2022-08-17 17:00:09 +0000 Commit: John Baldwin CommitDate: 2022-08-25 16:35:02 +0000 bhyve: Style fix for read/write_config. (cherry picked from commit bcab868a650e56d1b452903a1bf23993cf539c2e) --- usr.sbin/bhyve/pci_passthru.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c index bb98a64b8181..0dfaf5908670 100644 --- a/usr.sbin/bhyve/pci_passthru.c +++ b/usr.sbin/bhyve/pci_passthru.c @@ -143,12 +143,12 @@ pcifd_init(void) uint32_t read_config(const struct pcisel *sel, long reg, int width) { + struct pci_io pi; + if (pcifd < 0 && pcifd_init()) { return (0); } - struct pci_io pi; - bzero(&pi, sizeof(pi)); pi.pi_sel = *sel; pi.pi_reg = reg; @@ -163,12 +163,12 @@ read_config(const struct pcisel *sel, long reg, int width) void write_config(const struct pcisel *sel, long reg, int width, uint32_t data) { + struct pci_io pi; + if (pcifd < 0 && pcifd_init()) { return; } - struct pci_io pi; - bzero(&pi, sizeof(pi)); pi.pi_sel = *sel; pi.pi_reg = reg;