From nobody Fri Jun 02 17:43:40 2023 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 4QXr2h3LBnz4YDx7; Fri, 2 Jun 2023 17:43:40 +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 4QXr2h2QPqz3ldN; Fri, 2 Jun 2023 17:43:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685727820; 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=lJzz5vKdNK5olhp+CoKsuKkQzecXv8+lhX7d9qMP+jI=; b=fHn3zGk8u2Ujo6LtxD+bVGmfbiWtHEsFr/O7wZ51m91jxbBlqIGmIDB5GwrvSnPE65alNh 7uB92XXcJw7Vq2qA8SxKvzXR+J2jpNI69W56CISetRUc7w0aUVX29wJkH+JOCM0mZo0/UX fQ0DUjyIhecn5bXOgNHcfnnSnUkK6u9G9BqXcZ3Lu0MwHkShIJHfgnRXPwpNaLsV2gefpC XO0cdIpnm6IA851cAEfT4ffYgcBFRkr63Wg3vkYhfrbl46XCf5KqVtHQX7mYHm1EmiuaSv fAG7L1RTXEG/A+qJ/XhSY2O7KvFjliGS46fuuwrN72dkLvD9wu+7wrYtku9YcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685727820; 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=lJzz5vKdNK5olhp+CoKsuKkQzecXv8+lhX7d9qMP+jI=; b=X5UmLjIf7jAPqCVA2t5BhHza6EV0ES+hjdbgPT4XEFHON71d1e6x27zz9D7vt8NLpVJsQI RhmrrqSJzJXTLpraC4L/R5aaj9Npybv8C9fpKUhv0dLIwK8JPFhMX8kvZOesC4WtVSiBEi kJZ4K5CRXCB01CbQU3Zth0Je88vaV1n7UWB5PR0tLNEYd6FR9+jsPgy1jnLLW+UZyPHSOP cZmWDxwt7xSm6aG4WQ3luWubTj1N/monhkfpPSpDuwe0z1U/LSJ29iseu8a9qJynU/H5ob 1qwaH2U1TGyNzkpyzcKUuK5o+OOPXj9XMNEyq/ug/PgYOadIQl05YbT+0aC8DA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685727820; a=rsa-sha256; cv=none; b=kr0DveVtLaF1cgG/6auv8wWJAFBL2on1IGJnsH555T645tGHAjbnyz0oGca3vGPtAl2Dn3 +OY8IocBwo51KJmJ/C1FjCiQEi8UsoilV+4R6iQY7z6uhhFhNAzrxUMuKZ3bJ7lwkFvEpq bF37cj3Mibdv83QxoQzRUQcA9sjgtGveEzwUJq4OOMd4C6uwbxL2J/CksHCOyI5nNjX1If 8xHzSLnGJh41MSulERwRuxtIgmApKkvEy6i2axPTqidOlMWJ8WgSL9pxlVkbs1AEUAvc14 dScKw4yCTLaxrLQprJ7ajjBrP+Q2ACdaPtJLOKqPT2bIicLZueldwAwjfy6Pyw== 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 4QXr2h1Qskz17dQ; Fri, 2 Jun 2023 17:43:40 +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 352HhebV008036; Fri, 2 Jun 2023 17:43:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 352HheXk008035; Fri, 2 Jun 2023 17:43:40 GMT (envelope-from git) Date: Fri, 2 Jun 2023 17:43:40 GMT Message-Id: <202306021743.352HheXk008035@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: 7266f5249848 - main - x86: Mark the CPU idle function table as 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: 7266f5249848512b99d4dc78256af148f9df986e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7266f5249848512b99d4dc78256af148f9df986e commit 7266f5249848512b99d4dc78256af148f9df986e Author: Mark Johnston AuthorDate: 2023-06-02 17:22:32 +0000 Commit: Mark Johnston CommitDate: 2023-06-02 17:43:15 +0000 x86: Mark the CPU idle function table as const No functional change intended. MFC after: 1 week --- sys/x86/x86/cpu_machdep.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/x86/x86/cpu_machdep.c b/sys/x86/x86/cpu_machdep.c index e2b997016ab1..ffaa3789272e 100644 --- a/sys/x86/x86/cpu_machdep.c +++ b/sys/x86/x86/cpu_machdep.c @@ -719,9 +719,9 @@ cpu_idle_wakeup(int cpu) /* * Ordered by speed/power consumption. */ -static struct { +static const struct { void *id_fn; - char *id_name; + const char *id_name; int id_cpuid2_flag; } idle_tbl[] = { { .id_fn = cpu_idle_spin, .id_name = "spin" }, @@ -785,7 +785,8 @@ cpu_idle_selector(const char *new_idle_name) static int cpu_idle_sysctl(SYSCTL_HANDLER_ARGS) { - char buf[16], *p; + char buf[16]; + const char *p; int error, i; p = "unknown";