From: Julien Grall Date: Tue, 6 Apr 2021 18:34:08 +0000 (+0100) Subject: xen/sched: Constify name and opt_name in struct scheduler X-Git-Tag: archive/raspbian/4.16.0+51-g0941d6cb-1+rpi1~2^2~42^2~750 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1f0358093c101b170f7516779b70d3c8e11965ef;p=xen.git 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 --- 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 */