From 1f0358093c101b170f7516779b70d3c8e11965ef Mon Sep 17 00:00:00 2001 From: Julien Grall Date: Tue, 6 Apr 2021 19:34:08 +0100 Subject: [PATCH] xen/sched: Constify name and opt_name in struct scheduler Both name and opt_name are pointing to literal string. So mark both of the fields as const. Signed-off-by: Julien Grall Reviewed-by: Jan Beulich Acked-by: George Dunlap --- xen/common/sched/private.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/common/sched/private.h b/xen/common/sched/private.h index 92d0d49610..a870320146 100644 --- a/xen/common/sched/private.h +++ b/xen/common/sched/private.h @@ -272,8 +272,8 @@ static inline spinlock_t *pcpu_schedule_trylock(unsigned int cpu) } struct scheduler { - char *name; /* full name for this scheduler */ - char *opt_name; /* option name for this scheduler */ + const char *name; /* full name for this scheduler */ + const char *opt_name; /* option name for this scheduler */ unsigned int sched_id; /* ID for this scheduler */ void *sched_data; /* global data pointer */ struct cpupool *cpupool;/* points to this scheduler's pool */ -- 2.30.2