From nobody Thu Jan 26 19:47:47 2023 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 4P2rpX0Pw1z3bnGT; Thu, 26 Jan 2023 19:47:48 +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 4P2rpW66xLz3Cj8; Thu, 26 Jan 2023 19:47:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674762467; 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=5jQNeNHShZt7SQkShVvGkC9YvhMZLyHKGmSciDgx490=; b=nQZHxbBPp7HmA+J9F3K25BW2DyNjQkb40dW4Wg59Xi2FRGsmjishFR2qxtwX5nz3IqJS0M RO80s9uR6o9d5vQPxYtO8IFavydrPHv7HxE7w5OMc49ilacFf9GLpDttMrfl+Xd/FM5KG7 uP68VAIWZjL98EEG2fEzSRkuxhQg+VPiVz0r60fns03E/r+DOi2eKE/hK0KKo+FwDcFb10 KQUKNebpB/u1kYQ7T2n1id2cjNyPi3O/eo6TWHuoUCTlYvqix7Bi4cY1kCTJ1oQdfKoAEL BlvsNvgE6VP6gSOl1Gmw/KFwcgX6a7CjiaK3DYbRiUX8p4UJrocdVYFlxar0ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674762467; 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=5jQNeNHShZt7SQkShVvGkC9YvhMZLyHKGmSciDgx490=; b=El1ONtefYRv/XUTApARlTsZMlbrSKytP69QKV0x9XQAFApyOzwUddTKDprR9BWPUb387F7 eQiCLhu22UJD4tGxJ4f6Jmz0VYj9dSlv3+ANJJAew3D6dF2tu4OgYXef8KlUbEXI3b2k2E xGB97FaCnlkPBoAA0tSd6OJbGIhjwISYqOsfC1MgSF2P+ElCe0ba7X3OaQincfBEkZstYw OGKZ20jMGjBY9M3YAsLdpRx86YidBYiE+OQxNLGu4zu6J5W6xsqACWu+1eawTu8IagrXth BSZNvGpliA0c96PlyNRfj7hnIzPDA37xLunX2hyg5pStOnSjApfb7RbBGhQg2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674762467; a=rsa-sha256; cv=none; b=cM5YvTo2xsToOEijXqZlCFiHBXgoMjXNPBdI1laoG1nCMTTL3sxD6+6v4sVObM8qxIlqF9 KgaGY6RRcUgrqjrSPoMe9xcRl1l4BPKbg6Ur04KO3E8DqhQZuvTkLkpxnjLMqUCCv11MXS x1lcOXmWLRx0fMzwzvTSuEJ2RFrkS9bMMPgYypwZEdoQwEmPiWZ0KtDvxLW/JP1BgPhH1e QNCLPuNFDr/VLlJMGh8HhX7Ht/awe77kzsutjZ6EYv/foZ8Uqzkmvb/Kn4IvSBA/qezX2z pT1t6h/ssZonapZqdzthHy7vmi8GFMENraFafP92mXMCIsYXXwajyLAm9x5GfA== 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 4P2rpW4wMCzhWc; Thu, 26 Jan 2023 19:47:47 +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 30QJllt1007088; Thu, 26 Jan 2023 19:47:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30QJllGW007087; Thu, 26 Jan 2023 19:47:47 GMT (envelope-from git) Date: Thu, 26 Jan 2023 19:47:47 GMT Message-Id: <202301261947.30QJllGW007087@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: 1934d1a738d1 - stable/13 - bhyve: Make hda_ops function tables const 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: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: 1934d1a738d12815e2e7ec38dc9df572bc90cdbd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1934d1a738d12815e2e7ec38dc9df572bc90cdbd commit 1934d1a738d12815e2e7ec38dc9df572bc90cdbd Author: Mark Johnston AuthorDate: 2022-10-23 14:43:06 +0000 Commit: John Baldwin CommitDate: 2023-01-26 19:30:50 +0000 bhyve: Make hda_ops function tables const No functional change intended. MFC after: 1 week (cherry picked from commit 489392feb7dd784b6036dd6511c690e4df9726e3) --- usr.sbin/bhyve/hda_codec.c | 8 ++++---- usr.sbin/bhyve/pci_hda.c | 2 +- usr.sbin/bhyve/pci_hda.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/usr.sbin/bhyve/hda_codec.c b/usr.sbin/bhyve/hda_codec.c index 2cc875d3d2e2..cfab2e7f2547 100644 --- a/usr.sbin/bhyve/hda_codec.c +++ b/usr.sbin/bhyve/hda_codec.c @@ -465,7 +465,7 @@ hda_codec_init(struct hda_codec_inst *hci, const char *play, static int hda_codec_reset(struct hda_codec_inst *hci) { - struct hda_ops *hops = NULL; + const struct hda_ops *hops = NULL; struct hda_codec_softc *sc = NULL; struct hda_codec_stream *st = NULL; int i; @@ -500,8 +500,8 @@ hda_codec_reset(struct hda_codec_inst *hci) static int hda_codec_command(struct hda_codec_inst *hci, uint32_t cmd_data) { + const struct hda_ops *hops = NULL; struct hda_codec_softc *sc = NULL; - struct hda_ops *hops = NULL; uint8_t cad = 0, nid = 0; uint16_t verb = 0, payload = 0; uint32_t res = 0; @@ -677,9 +677,9 @@ hda_codec_audio_output_nid(struct hda_codec_softc *sc, uint16_t verb, static void hda_codec_audio_output_do_transfer(void *arg) { + const struct hda_ops *hops = NULL; struct hda_codec_softc *sc = (struct hda_codec_softc *)arg; struct hda_codec_inst *hci = NULL; - struct hda_ops *hops = NULL; struct hda_codec_stream *st = NULL; struct audio *aud = NULL; int err; @@ -738,9 +738,9 @@ hda_codec_audio_input_nid(struct hda_codec_softc *sc, uint16_t verb, static void hda_codec_audio_input_do_transfer(void *arg) { + const struct hda_ops *hops = NULL; struct hda_codec_softc *sc = (struct hda_codec_softc *)arg; struct hda_codec_inst *hci = NULL; - struct hda_ops *hops = NULL; struct hda_codec_stream *st = NULL; struct audio *aud = NULL; int err; diff --git a/usr.sbin/bhyve/pci_hda.c b/usr.sbin/bhyve/pci_hda.c index 9ebfbfbaa5bf..734711cad99c 100644 --- a/usr.sbin/bhyve/pci_hda.c +++ b/usr.sbin/bhyve/pci_hda.c @@ -264,7 +264,7 @@ static const uint16_t hda_rirb_sizes[] = { [HDAC_RIRBSIZE_RIRBSIZE_MASK] = 0, }; -static struct hda_ops hops = { +static const struct hda_ops hops = { .signal = hda_signal_state_change, .response = hda_response, .transfer = hda_transfer, diff --git a/usr.sbin/bhyve/pci_hda.h b/usr.sbin/bhyve/pci_hda.h index e86867192193..8d4f77920c29 100644 --- a/usr.sbin/bhyve/pci_hda.h +++ b/usr.sbin/bhyve/pci_hda.h @@ -65,7 +65,7 @@ struct hda_codec_inst { uint8_t cad; struct hda_codec_class *codec; struct hda_softc *hda; - struct hda_ops *hops; + const struct hda_ops *hops; void *priv; };