git: bdfc441d41f5 - stable/13 - x86: Mark the CPU idle function table as const

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Fri, 09 Jun 2023 17:21:27 UTC
The branch stable/13 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=bdfc441d41f5ceacf389ea347a85cd42d25f6388

commit bdfc441d41f5ceacf389ea347a85cd42d25f6388
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-06-02 17:22:32 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-06-09 17:19:47 +0000

    x86: Mark the CPU idle function table as const
    
    No functional change intended.
    
    MFC after:      1 week
    
    (cherry picked from commit 7266f5249848512b99d4dc78256af148f9df986e)
---
 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 37db1e85a374..1d5f7e548dc1 100644
--- a/sys/x86/x86/cpu_machdep.c
+++ b/sys/x86/x86/cpu_machdep.c
@@ -724,9 +724,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" },
@@ -790,7 +790,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";