From nobody Wed Aug 17 17:02:20 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 4M7DpN4FvXz4YgYM; Wed, 17 Aug 2022 17:02:20 +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 4M7DpN3k9Nz3srY; Wed, 17 Aug 2022 17:02:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660755740; 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=5HHOeDYBfq9mn6+jOxuPAu2J1ezjjmYBhSZWMKkOcEo=; b=bqk6W3cE6lx9OTbPB1B2xFYF9IelgZpLUKuNhNZO5ltPsqXngx26GhoyKMy9GruGJeizEw ZTkdx5STwsHgO+xuUsmGeNliBSWtFLAyjtBi/Ap8KEpnjxdLTkAxu7819XapLv9CfEyohx GmLQeRrmh60h8Ht9Te06tgCxoE2IyTp8guv4Mgd5Bhg68q0py5B3wDNvKCmmOQLokZPv6p GysUhjREQZ2oj7golYdeBTylI7SUKu7x34OSo5i2SwVfvlBNGYfGl0VKcKNTY5WZPMpxC6 PMKUlWy18uBCtZNmx8DaRfTL5OFhJwsWGWhnGBGM3HngO1rvBDd19UcnoHJJEg== 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 4M7DpN2nNpzxJr; Wed, 17 Aug 2022 17:02:20 +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 27HH2Kvv055742; Wed, 17 Aug 2022 17:02:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27HH2Kns055741; Wed, 17 Aug 2022 17:02:20 GMT (envelope-from git) Date: Wed, 17 Aug 2022 17:02:20 GMT Message-Id: <202208171702.27HH2Kns055741@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: bcab868a650e - main - 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/main X-Git-Reftype: branch X-Git-Commit: bcab868a650e56d1b452903a1bf23993cf539c2e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660755740; 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=5HHOeDYBfq9mn6+jOxuPAu2J1ezjjmYBhSZWMKkOcEo=; b=VHU2aoOucmvnPeg4YzWxLRW5M9UEWCQpcN78M+OvjntG1DsQhOy6oWbquQr4LQstjahXlE EO71WXyldJwqReWVBoFCpwVYsJqPyr9xIWd1VB3pS4vzBCji0Ov1w0eMULjDrhs19dSXeO JR6pmS0s0EhR9KFU8+8PLab8HRhutzraXX0W+ys8PNE82uvLrgDQuuOGpIyAz36jPrp01n 2gLSEBtL21Rw4pRfpVmCOuIATzsuG6zYCfsD9wIIFRAkFvgYCiLvmwCvySaMcX0ChWPKRq 2+qr9npSqKApGqAFaTFD3QQjf2gR3KeZxP3RSBiKkGhCoGMMNEN9KHNwGcH5YA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660755740; a=rsa-sha256; cv=none; b=lfml3rWumXVVugvrU26nmgfaCC0fqrV7MJvmZbnEfmAiksQ3A5M3zfiFflydPH7E0zSf16 PngIL20gDv1b+BwlnCFPSsSUJz6tJCaJpsNvVVZ1/NdUKTsEmSeUQbVOf3mEAhRZmFrRfy NF9PiSfB87bvjNTQODXim7cRy2N4kmK6wxtqEdcYVpttC/C+YY/L3eaF7EKGGJHp1cXRmU cob8SDJpzBokSr1iwIkgJPYu3u5pXWehqDUTzK301Ud8+8kV2244p4Q8X3Ls4Z0jW+OuzO rfXoB5yxsWL34wJiYHli8bLjXaY7xWAiYrd5Su8hWhmEUQqf2MTsnxz4E30XYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bcab868a650e56d1b452903a1bf23993cf539c2e commit bcab868a650e56d1b452903a1bf23993cf539c2e Author: John Baldwin AuthorDate: 2022-08-17 17:00:09 +0000 Commit: John Baldwin CommitDate: 2022-08-17 17:00:09 +0000 bhyve: Style fix for read/write_config. --- 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 e244915773be..2b2f240fafe3 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;