From nobody Sun Oct 23 15:18:45 2022 X-Original-To: dev-commits-src-main@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 4MwMKx4gQwz4gdXs; Sun, 23 Oct 2022 15:18:45 +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 4MwMKx4D6nz3fcg; Sun, 23 Oct 2022 15:18:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666538325; 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=DG/y5RSf7C9p7HrV/l5opiWQ/b81LWaKzB40rNkSah8=; b=ccCy16GidsUYG1ZXQhH4XhsDMQf57FyaTMsf4zlqM1TfpGUuzucWy4tRSk4UrxPmCDPdP6 46MiwUzsOMqKwk4DFLEZ4j65QkUt/uBWrhi31vUzboXq2coT31FUqPNXga04eAks48z2XD Ghxh2uJLzUIYuJMisHeu5HWjzNCzmX9MScfcYBEVgMV7uny8TupLmY1equaMCahQQmq/34 Qk05nUvQuqqGNiy1PXtZzSE8BK/QE+7fPHubaUS+K9aBS0okN4VuKWnkXvmr3AeT9OwhUc WFY0EiReSew48fwKQjdVWolfJ6tHR1reXpdha5qhkYE86hRDpJDJm+oZU3OvjA== 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 4MwMKx34MfzwM2; Sun, 23 Oct 2022 15:18:45 +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 29NFIjTl076408; Sun, 23 Oct 2022 15:18:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29NFIj1F076407; Sun, 23 Oct 2022 15:18:45 GMT (envelope-from git) Date: Sun, 23 Oct 2022 15:18:45 GMT Message-Id: <202210231518.29NFIj1F076407@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: 489392feb7dd - main - bhyve: Make hda_ops function tables const List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: 489392feb7dd784b6036dd6511c690e4df9726e3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666538325; 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=DG/y5RSf7C9p7HrV/l5opiWQ/b81LWaKzB40rNkSah8=; b=tIcSepmDCjPy6441RuBurdYAkKnVbfEEJYhB3wWMXoaiFtZ+Ayngs+OstPiTaZFXSzS0zX S3d5Biaj8OMQyMVThku5/ECV8slkbyd8p2hFYeSLB+YRvUNTJKJt9951TtDAKSXpBhEY+8 n4Y331DnGY/HJXfovb1iJYYLzm9g6AvXWsXux/nfP9odS/Znwy8F0b5Q8g4q1kj9bjW2Ow WIPjfpF3gNAcqJ1H2YT2gyva89RWbCdzhkZ9IcwRdU1FQyhKbGc86V4hL/C8dz3MiWSU9S 7h8j6+B2Yne+UE7RaDfE7bai8NGeJfpdVUVPDLWma093iznjDqSVzJQxpC5jTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666538325; a=rsa-sha256; cv=none; b=g4CBs8MAqKw70xpWkeJBxK5fJSizx90JQS+TwmiM1oBNMdG9luRY9x69xG9HtRaomoMIrB TcxOjEhCTHccRmGzrd47caY0dn4rj9Qr+EThl2iXbGv5MFaEW6Rd70BThObDYhe/5HiSbZ NMrfdTkos8P0QyL0Y830dp2GC3fnJUxYBv007QSQSz2DwU7JU9PVtALDDSYoHsldn1U26t UJSJ5yYchI2CojQFGMtANi/UkvXUJTf5bU1K/y6zEi535Meg7ZRgpgPoP6whIJ5ywut4f2 z7DtDsLSxqAgTcUXHZb43ifk8Xj3WfVERYhW2hHUjXEjwP94piogF4gKT4WcLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=489392feb7dd784b6036dd6511c690e4df9726e3 commit 489392feb7dd784b6036dd6511c690e4df9726e3 Author: Mark Johnston AuthorDate: 2022-10-23 14:43:06 +0000 Commit: Mark Johnston CommitDate: 2022-10-23 15:11:33 +0000 bhyve: Make hda_ops function tables const No functional change intended. MFC after: 1 week --- 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 88f58a5fcc66..dc6493868093 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 50cbac82a1a6..a021aa9c28da 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; };